setfpscap Synchronous
set_fps_cap
Set the requested frame-rate limit for the runtime. Use it to choose a rendering budget that suits the device. Save the previous cap if your script changes it temporarily.
Luau
setfpscap(fps: number) -> ()Parameters
| Parameter | Type | Description |
|---|---|---|
fps | number | Requested frame-rate cap in frames per second. |
Returns
()This function returns no values.
Usage notes
A configured cap is a limit, not a guarantee that the device will render at that rate.
Example
Luau
local previous = getfpscap()
setfpscap(60)
print("Configured cap:", getfpscap())
setfpscap(previous)