Miscellaneous

getfpscap

Returns the current FPS cap value represented by Roblox, or 0 when the value cannot be read.

语法

getfpscap(): number
别名 get_fps_cap

返回值

名称类型描述
fpsCapnumberCurrent FPS cap value, or 0 when unavailable.

说明

Returns the current FPS cap value represented by Roblox, or 0 when the value cannot be read.

无需参数即可调用。函数会从当前 runtime 状态读取所需上下文。

返回 fpsCap (number)。使用返回表区分成功值、nil 结果和可恢复错误。

示例

Read the FPS cap value currently represented by the TaskScheduler cap field.

local fpsCap = getfpscap()
print(fpsCap)