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

NameTypeDirectionPurpose
GetAccessRemoteFunctionclient → serverReturns true if the caller has access.
RecorderCommandRemoteFunctionclient → serverRuns a command. First argument is the command name.
RecorderUpdateRemoteEventserver → clientPushes 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

CommandArgumentsWhat it does
State—Current recorder state snapshot.
LiveEvents—Events captured so far in the active recording.
SetupoptsBegin the pre-recording setup phase.
StartoptsStart a recording (countdown, lights, cameras, externals, song).
Stop—Stop the active recording.
MarkerlabelAdd a marker at the current time.
Playid, optsPlay a recording (speed, volume).
StopPlayback—Stop playback.
Pause / Resume—Pause or resume playback.
SeeksecondsJump to a time.
SkipsecondsJump relative to now.
PlaySpeedspeedChange playback speed.
GetidReturn a full recording.
Renameid, nameRename (max 60 characters).
DeleteidDelete a recording.
DuplicateidCopy a recording.
Nudgeids, secondsShift recordings by −60 to 60 seconds.
CombineoptsMerge recordings: ids, mode, gap, keepAllSongs, name, play.
SetSongid, specAttach or clear (nil) the recording's song.
SetSongSpeedid, speedChange a song's speed.
SaveSong / RenameSong / DeleteSong…Manage the saved song list.
ExportOptionsoptionsSet export options.
ExportidReturn the Lua export text.

Updates

KindPayload
snapshotFull recorder state after any change.
playPlayback info: position, speed, paused.
liveNew events while recording (from, events).
countRunning event count.
messageA 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
FunctionPurpose
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

ScriptRuns onRole
MainServerAccess, remotes, command handling, wiring.
RecorderServerCapture, playback, songs and state.
LibraryServerStorage, merge, nudge and Lua export.
LightsServerServerLights integration and the LightsAvailable attribute.
ClientClientFinds panels, clears placeholder text, starts each one. Also keeps music in sync.
PanelClientClientBuilds the whole interface on a single panel.
TimelineHelper / LightsTabClientTimeline maths and the Lights page.