Skip to main content

Getting Started

Flow Sequencer is a timeline editor for Roblox Studio and a runtime that plays what it authors. Sequences are built in the plugin and stored in the place under ReplicatedStorage.Flow.Sequences. The runtime, Flow, is what your code requires to play them.

The executor​

The plugin injects the runtime at ReplicatedStorage.Flow the first time a sequence is created in a place. A place without sequences is never touched.

local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Flow = require(ReplicatedStorage.Flow)

The first require is what starts the executor. Synced playback needs it required on the server and on every client, for example from a LocalScript in StarterPlayerScripts, even if that client never calls it.

Playing on one client​

Flow:Play evaluates a sequence on the calling client and returns a Playback:

local playback = Flow:Play("DoorOpen", {
Bindings = { Door = hitDoor }, -- fills the sequence's "Door" binding
Parameters = { OpenAngle = 90 }, -- overrides a sequence parameter for this play
})

playback.Completed:Wait()

Pause, Resume, Seek, SetRate, and Stop control it. Stop applies each section's restore policy: Restore puts properties back, Hold keeps the final state.

Playing for everyone​

A server starts synced playback with Flow:PlayForAll or Flow:PlayFor. Both return a SequenceTrack, the only handle that controls the playback:

local track = Flow:PlayForAll("DoorOpen", { Bindings = { Door = door } })
task.wait(1)
track:Pause()

Every control call updates a shared record that each client derives its time from, so players who join late land at the same point. Sequences with Hold sections are also replayed to their final state for late joiners after the track ends. The playbacks clients create for a track are read-only.

Custom camera systems​

A Camera track takes control of workspace.CurrentCamera while any of its sections is active and gives it back when the last one exits, including on an early stop or an error. A game with its own camera should step aside while Flow holds it; see CameraOwnership.

Extending Flow​

  • Section types: a ModuleScript in Flow.CustomSections, or imported through the Inspector, that declares its parameters and implements Evaluate or Enter/Exit. See SectionTypes and examples/PulseSection.luau in the repository.
  • Subject presets: a ModuleScript in Flow.CustomPresets that produces a subject at play time. See Presets.
  • Value types: register an interpolator with Interpolation.

The design document explains the model behind all of this.