I'm trying to run this script but it doesn't do anything? Does it have to be a localscript?
Here's what I have so far:
1 | local RunService = game:GetService( "RunService" ) |
2 | while RunService.RenderStepped:Wait() do |
3 | local t 0 = tick() |
4 | RunService.Heartbeat:Wait() |
5 | debug.profilebegin( "30 FPS Cap" ) |
6 | repeat until (t 0 + 0.0325 ) < tick() |
7 | debug.profileend() |
8 | end |
Put this in a local script to cap the framerate to 30:
1 | local RunService = game:GetService( "RunService" ) |
2 |
3 | while RunService.RenderStepped:Wait() do |
4 | local t 0 = tick() |
5 | RunService.Heartbeat:Wait() |
6 | debug.profilebegin( "30 FPS Cap" ) |
7 | repeat until (t 0 + 0.0325 ) < tick() |
8 | debug.profileend() |
9 | end |
You can't control the Roblox's client frame rate in a script.