Services
RunService
Per-frame signals and runtime-state queries for simulation and rendering work.
Access
Luau
local RunService = game:GetService("RunService")Signals
| Name | Type | Description |
|---|---|---|
PreSimulation | signal | Fires before the runtime steps character physics and passes deltaTime. |
Stepped | signal | Receives scheduler time and deltaTime before the physics step. |
Heartbeat | signal | Receives deltaTime after the physics step. |
RenderStepped | client signal | Fires once per rendered client frame. Available to LocalScripts and CoreScripts, not ServerScripts. |
Methods
| Name | Type | Description |
|---|---|---|
IsServer() | boolean | Returns true when this Luau runtime is the authoritative server. |
IsClient() | boolean | Returns true when this Luau runtime is a client. |
IsRunning() | boolean | Returns 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.