Skip to main content

SequenceTrack

This item only works when running on the server. Server

The server-side handle for a synced playback, returned by Flow:PlayForAll and Flow:PlayFor and loosely modeled on AnimationTrack. It is the only way to control a synced playback: every call updates the shared playback record and rebroadcasts it, so every client, late joiners included, derives the same state.

local track = Flow:PlayForAll("DoorOpen", { Bindings = { Door = door } })
track:Pause()
track:Seek(2.5)
track:Resume()

Properties​

Length​

This item is read only and cannot be modified. Read Only
SequenceTrack.Length: number

IsPlaying​

This item is read only and cannot be modified. Read Only
SequenceTrack.IsPlaying: boolean

IsActive​

This item is read only and cannot be modified. Read Only
SequenceTrack.IsActive: boolean

False once the track has completed or stopped.

Completed​

SequenceTrack.Completed: Signal

Fires when the shared clock reaches the end of the sequence.

Stopped​

SequenceTrack.Stopped: Signal

Fires when SequenceTrack:Stop ends the track early.

Functions​

GetTime​

SequenceTrack:GetTime() → number

Returns the sequence time every client is at, derived from the shared record and the server clock.

Pause​

SequenceTrack:Pause() → ()

Resume​

SequenceTrack:Resume() → ()

Seek​

SequenceTrack:Seek(time: number) → ()

Moves every client to time, clamped to the sequence.

SetRate​

SequenceTrack:SetRate(rate: number) → ()

Sets the speed multiplier for every client. 1 is normal speed.

Stop​

SequenceTrack:Stop() → ()

Stops the synced playback for everyone and applies restore policies at the current time. Sections with the Hold policy keep their final state for players who join later.

Destroy​

SequenceTrack:Destroy() → ()

Stops the track and releases its signals.

Show raw api
{
    "functions": [
        {
            "name": "GetTime",
            "desc": "Returns the sequence time every client is at, derived from the shared record and the server clock.",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "number\n"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 117,
                "path": "runtime/SequenceTrack.luau"
            }
        },
        {
            "name": "Pause",
            "desc": "",
            "params": [],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 142,
                "path": "runtime/SequenceTrack.luau"
            }
        },
        {
            "name": "Resume",
            "desc": "",
            "params": [],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 155,
                "path": "runtime/SequenceTrack.luau"
            }
        },
        {
            "name": "Seek",
            "desc": "Moves every client to `time`, clamped to the sequence.",
            "params": [
                {
                    "name": "time",
                    "desc": "",
                    "lua_type": "number"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 169,
                "path": "runtime/SequenceTrack.luau"
            }
        },
        {
            "name": "SetRate",
            "desc": "Sets the speed multiplier for every client. 1 is normal speed.",
            "params": [
                {
                    "name": "rate",
                    "desc": "",
                    "lua_type": "number"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 181,
                "path": "runtime/SequenceTrack.luau"
            }
        },
        {
            "name": "Stop",
            "desc": "Stops the synced playback for everyone and applies restore policies at the current time. Sections with\nthe `Hold` policy keep their final state for players who join later.",
            "params": [],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 195,
                "path": "runtime/SequenceTrack.luau"
            }
        },
        {
            "name": "Destroy",
            "desc": "Stops the track and releases its signals.",
            "params": [],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 225,
                "path": "runtime/SequenceTrack.luau"
            }
        }
    ],
    "properties": [
        {
            "name": "Length",
            "desc": "",
            "lua_type": "number",
            "readonly": true,
            "source": {
                "line": 70,
                "path": "runtime/SequenceTrack.luau"
            }
        },
        {
            "name": "IsPlaying",
            "desc": "",
            "lua_type": "boolean",
            "readonly": true,
            "source": {
                "line": 76,
                "path": "runtime/SequenceTrack.luau"
            }
        },
        {
            "name": "IsActive",
            "desc": "False once the track has completed or stopped.",
            "lua_type": "boolean",
            "readonly": true,
            "source": {
                "line": 83,
                "path": "runtime/SequenceTrack.luau"
            }
        },
        {
            "name": "Completed",
            "desc": "Fires when the shared clock reaches the end of the sequence.",
            "lua_type": "Signal",
            "source": {
                "line": 89,
                "path": "runtime/SequenceTrack.luau"
            }
        },
        {
            "name": "Stopped",
            "desc": "Fires when [SequenceTrack:Stop] ends the track early.",
            "lua_type": "Signal",
            "source": {
                "line": 95,
                "path": "runtime/SequenceTrack.luau"
            }
        }
    ],
    "types": [],
    "name": "SequenceTrack",
    "desc": "The server-side handle for a synced playback, returned by [Flow:PlayForAll] and [Flow:PlayFor] and loosely\nmodeled on `AnimationTrack`. It is the only way to control a synced playback: every call updates the shared\nplayback record and rebroadcasts it, so every client, late joiners included, derives the same state.\n\n```lua\nlocal track = Flow:PlayForAll(\"DoorOpen\", { Bindings = { Door = door } })\ntrack:Pause()\ntrack:Seek(2.5)\ntrack:Resume()\n```",
    "realm": [
        "Server"
    ],
    "source": {
        "line": 62,
        "path": "runtime/SequenceTrack.luau"
    }
}