setfpscap
Sets the FPS cap for the game.
Syntax
setfpscap(fps: number) -> ()Parameters
| Parameter | Type | Description |
|---|---|---|
fps | number | The FPS cap to set |
Returns
This function does not return a value.
Description
setfpscap sets the maximum frame rate. Pass 0 to remove the cap.
Example
-- Cap at 60 FPS
setfpscap(60)
-- Remove the cap
setfpscap(0)
-- Cap at 144 FPS
setfpscap(144)Notes
- The value must be non-negative
- Higher FPS may increase CPU/GPU usage
Related Functions
getfpscap- Get current FPS cap