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.

Syntax
Luau
setfpscap(fps: number) -> ()

Parameters

Function parameters
ParameterTypeDescription
fpsnumberRequested 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

Example
Luau
local previous = getfpscap()
setfpscap(60)
print("Configured cap:", getfpscap())
setfpscap(previous)
Kawaii documentation