Reference
Functions & API
The panel is just a client. Everything it does goes through three remotes in Lecorder.Events, which you can call from your own scripts.
Remotes
| Name | Type | Direction | Purpose |
|---|---|---|---|
GetAccess | RemoteFunction | client → server | Returns true if the caller has access. |
RecorderCommand | RemoteFunction | client → server | Runs a command. First argument is the command name. |
RecorderUpdate | RemoteEvent | server → client | Pushes state to players with access. |
Every command returns a table with ok = true, or ok = false and an error string. Callers without access always get { ok = false, error = "No access" }.
local events = workspace.Lecorder.Events
local command = events:WaitForChild("RecorderCommand")
local result = command:InvokeServer("Start", { countdown = 5 })
if not result.ok then warn(result.error) end
command:InvokeServer("Marker", "Drop")
command:InvokeServer("Stop")
Commands
| Command | Arguments | What it does |
|---|---|---|
State | — | Current recorder state snapshot. |
LiveEvents | — | Events captured so far in the active recording. |
Setup | opts | Begin the pre-recording setup phase. |
Start | opts | Start a recording (countdown, lights, cameras, externals, song). |
Stop | — | Stop the active recording. |
Marker | label | Add a marker at the current time. |
Play | id, opts | Play a recording (speed, volume). |
StopPlayback | — | Stop playback. |
Pause / Resume | — | Pause or resume playback. |
Seek | seconds | Jump to a time. |
Skip | seconds | Jump relative to now. |
PlaySpeed | speed | Change playback speed. |
Get | id | Return a full recording. |
Rename | id, name | Rename (max 60 characters). |
Delete | id | Delete a recording. |
Duplicate | id | Copy a recording. |
Nudge | ids, seconds | Shift recordings by −60 to 60 seconds. |
Combine | opts | Merge recordings: ids, mode, gap, keepAllSongs, name, play. |
SetSong | id, spec | Attach or clear (nil) the recording's song. |
SetSongSpeed | id, speed | Change a song's speed. |
SaveSong / RenameSong / DeleteSong | … | Manage the saved song list. |
ExportOptions | options | Set export options. |
Export | id | Return the Lua export text. |
Updates
| Kind | Payload |
|---|---|
snapshot | Full recorder state after any change. |
play | Playback info: position, speed, paused. |
live | New events while recording (from, events). |
count | Running event count. |
message | A notice to show the user, with a level. |
Recording your own systems
Lights and cameras are picked up automatically. To make any other system recordable, register it through the shared table that the recorder publishes on the server:
local recorder = shared.LevipilotRecorder
local fog = {
On = function() end,
Off = function() end,
}
recorder.Register("Fog", fog) -- calls to fog.On / fog.Off are now captured
-- recorder.Unregister("Fog")
if recorder.IsRecording() then
recorder.Marker("Fog test")
end
| Function | Purpose |
|---|---|
Register(name, handlers, opts) | Wrap every function in handlers so calls are recorded. Options: self = true if the functions are called with :, and export = { call, prelude } to control the exported Lua. |
Unregister(name) | Stop recording a system and restore its original functions. |
Log(name, method, ...) | Record a call manually without wrapping. |
Marker(label) | Add a marker. |
IsRecording() | true while a recording is active. |
Where it runsThe registry is created by the
Main script on the server, so register from a server Script after the recorder has started. Registered systems show up in the Others lane.How the scripts fit together
| Script | Runs on | Role |
|---|---|---|
| Main | Server | Access, remotes, command handling, wiring. |
| Recorder | Server | Capture, playback, songs and state. |
| Library | Server | Storage, merge, nudge and Lua export. |
| LightsServer | Server | Lights integration and the LightsAvailable attribute. |
| Client | Client | Finds panels, clears placeholder text, starts each one. Also keeps music in sync. |
| PanelClient | Client | Builds the whole interface on a single panel. |
| TimelineHelper / LightsTab | Client | Timeline maths and the Lights page. |