RunService
The heartbeat of your scripts, like Roblox's: run code every frame, and know when a render is catching up.
RunService is a service: get it with game:GetService("RunService"). Heartbeat, Stepped and RenderStepped fire every frame while scripts run, on play time rather than the wall clock. IsCatchingUp() is true while a render runs the frames before its first one with drawing off, so heavy code can skip itself. IsStudio() and IsRunning() both return true.
Methods
| Name | Arguments | Returns | Description |
|---|---|---|---|
| IsCatchingUp | () | boolean | True while a render runs a frame before its first one with drawing off; false while scripts start and in drawn frames. |
| IsRunning | () | boolean | Always returns true. |
| IsStudio | () | boolean | Always returns true. |
Events
| Name | Type |
|---|---|
| Heartbeat | RBXScriptSignal |
| RenderStepped | RBXScriptSignal |
| Stepped | RBXScriptSignal |
