Syntax
setfpscap(value: number)set_fps_capArguments
| Name | Type | Description |
|---|---|---|
value | number | Requested FPS cap. Values that are non-finite, less than or equal to 0, or greater than 2000 are treated as 2000 by the FPS cap update. |
Description
Sets the Roblox FPS cap with the FPS cap update and returns no values. The first argument must be a number. the FPS cap update reads the TaskScheduler reference, returns without writing if that reference is not valid memory, clamps non-finite values, values less than or equal to 0, and values greater than kMaxFPS to kMaxFPS, where kMaxFPS is 2000, then writes 1 / newFPS to Roblox FPS cap. The function does not report whether the write happened.
Call it with 1 parameter(s): value. The argument table explains which values are required and which ones only refine the behavior.
It does not return data. Treat the call as an action and handle errors around the call site when needed.
Example
Set the TaskScheduler FPS cap field and read it back with getfpscap.
setfpscap(240)
print(getfpscap())