How can I make RenderStepped lock to a maximum of 60 FPS?

If your main concern was smoothness, you wouldn’t be looking to block players from making their game run smoother. Use the time delta argument parsed with RenderStepped and Heartbeat events and multiply your interpolations.

local p0 = 0
local p1 = 10
local speed = 5 --units/second
local prog = 0
game:GetService("RunService").Heartbeat:Connect(function(deltat)
	prog = prog  + speed*deltat
	prog = math.clamp(prog,p0,p1)
end
14 Likes