Skip to main content

Recording

Recording runs on the server.

local Flashback = require(game.ReplicatedStorage.Flashback)

local rec = Flashback.Recorder.new({ tickRate = 15, keyframeEvery = 150 })
rec:watchProperties("BasePart", { "Color", "Transparency", "Size", "Material" })
rec:watchProperties("Humanoid", { "Health" })
rec:start()

-- Player characters are tracked automatically. For anything else:
projectile:AddTag(Flashback.TAG)
projectile:SetAttribute(Flashback.DESCRIPTOR_ATTRIBUTE, "model:Rocket")
-- or rec:track(projectile)

rec:event("Kill", { killer = 1, victim = 2 })

local blob = rec:stop()
Flashback.Store.save(`match_{os.time()}`, blob)

Options​

optiondefaultmeaning
tickRate15snapshots per second
keyframeEvery300ticks between full transforms
trackCharacterstruetag player characters automatically

Extending​

  • watchProperties(className, props) records bool, number, string, Color3, Vector3 and Enum properties on matching entities.
  • event(name, payload) queues a JSON event for the next tick.
  • registerChannel(name, writer) calls writer(w, tick) every tick with a binary writer for anything the generic system does not cover.
  • custom(channel, buffer) queues a one-off binary payload.
  • Animations on tracked models are captured from Animator.AnimationPlayed.

Descriptors​

The descriptor attribute tells playback what proxy to build:

descriptorproxy
char:<userId>Players:CreateHumanoidModelFromUserId
model:<name>clone of <name> under opts.prototypes, else rebuilt from the recorded geometry snapshot
part:<Shape>rebuilt from the snapshot (or a bare Part), shape overridden when given
anything elsemagenta placeholder part so missing prototypes show up