#i need help making a script
1 messages · Page 1 of 1 (latest)
You can artificially lower the fps by running an infinite loop for some amount of time
Putting the loop in pre-render should work
And you can use os.clock() to get precise times
i dont wanna sound rude, you should google site:devforum.roblox.com [insert issue here] and check out their approaches to fix the issue
or you could use brain power and think of a way to do it, but limiting fps is very advanced
its ok XD i was just trying to find a way to script it cuz im not used to using fps
oh right
but limiting fps is very advanced
no its literally just
local RunService = game:GetService("RunService")
local MAX_FPS = 10
local frame_start = 0
RunService.PreRender:Connect(function()
frame_start = os.clock()
end)
RunService.Heartbeat:Connect(function()
while os.clock() - frame_start < 1/MAX_FPS do end
end)
technically if our heartbeat event is called early, before most of the game logic, then it could end up waiting a little too long but it should be accurate enough for this.
ohhhh
interesting
thanks for the info
advanced for ppl who just started
it's pretty different from "how do I create a part within a script"