Glorpia Docs
Services

RunService

Per-frame signals and runtime-state queries for simulation and rendering work.

Access

Luau
local RunService = game:GetService("RunService")

Signals

NameTypeDescription
PreSimulationsignalFires before the runtime steps character physics and passes deltaTime.
SteppedsignalReceives scheduler time and deltaTime before the physics step.
HeartbeatsignalReceives deltaTime after the physics step.
RenderSteppedclient signalFires once per rendered client frame. Available to LocalScripts and CoreScripts, not ServerScripts.

Methods

NameTypeDescription
IsServer()booleanReturns true when this Luau runtime is the authoritative server.
IsClient()booleanReturns true when this Luau runtime is a client.
IsRunning()booleanReturns true while the runtime is active.

LocalScript example

Luau
local RunService = game:GetService("RunService")

RunService.RenderStepped:Connect(function(deltaTime)
    -- Client-only render work
end)
Public ServerScripts can use PreSimulation, Stepped and Heartbeat. RenderStepped is client-only.

Related