Flow
The executor and public runtime API, injected by the plugin at ReplicatedStorage.Flow.
local Flow = require(ReplicatedStorage.Flow)
local playback = Flow:Play("DoorOpen", {
Bindings = { Door = hitDoor },
Parameters = { OpenAngle = 90 },
})
playback.Completed:Wait()
Sequences evaluate on the client. A server starts synced playback with Flow:PlayForAll or Flow:PlayFor, which every client (late joiners included) derives from the same shared record.
Types
SequenceData
type SequenceData = tableA sequence loaded into the in-memory model the evaluator consumes: its length, fps, bindings, and tracks.
PlayOptions
interface PlayOptions {Parameters: {[string]: any}?--
Per-play overrides of sequence parameters
Rate: number?--
Playback speed multiplier; defaults to 1
StartTime: number?--
Sequence time to start from; defaults to 0
Loop: boolean?--
Restarts from the beginning instead of completing
}Properties
Version
This item is read only and cannot be modified. Read OnlyFlow.Version: stringThe runtime's semantic version, such as "0.4.0".
Camera
This item is read only and cannot be modified. Read OnlyFlow.Camera: CameraOwnershipThe camera handoff contract. See CameraOwnership.
SectionTypes
This item is read only and cannot be modified. Read OnlyFlow.SectionTypes: SectionTypesTrackTypes
This item is read only and cannot be modified. Read OnlyFlow.TrackTypes: TrackTypesPresets
This item is read only and cannot be modified. Read OnlyFlow.Presets: PresetsInterpolation
This item is read only and cannot be modified. Read OnlyFlow.Interpolation: InterpolationFunctions
GetSequenceNames
Flow:GetSequenceNames() → {string}--
Names of every sequence in the place, sorted
GetSequenceInstance
Returns the sequence's Configuration under Flow.Sequences, or nil if there is none.
GetSequence
Loads a sequence into its in-memory model. Warns and returns nil if it does not exist.
Play
This item only works when running on the client. ClientStarts a local playback of a sequence, given its name, its instance, or a loaded sequence. The playback runs on a local clock and is not synchronized with other clients; use Flow:PlayForAll for that.
Warns and returns nil on a running server, or if the sequence cannot be found.
PlayForAll
This item only works when running on the server. ServerStarts a synced playback for every client and returns the SequenceTrack that controls it.
PlayFor
This item only works when running on the server. ServerStarts a synced playback for one player and returns the SequenceTrack that controls it.
GetActivePlaybacks
This item only works when running on the client. ClientReturns every running playback on this client, local and synced.
GetActiveTracks
This item only works when running on the server. ServerReturns every running synced playback this server started.
StopAll
Flow:StopAll() → ()Stops every local playback and every server track, applying restore policies. Synced playbacks on a client are left to the server.
ExportSequence
Flow:ExportSequence(name: string) → string?Serializes a sequence to its portable JSON export.
ImportSequence
Imports a JSON export as a new sequence under Flow.Sequences. Warns and returns nil if the JSON is
invalid or a sequence with that name already exists.