You can write your topic however you want, but you need to answer these questions:
- What do you want to achieve? Keep it simple and clear!
I want my car chassis springs to work at any fps.
- What is the issue? Include screenshots / videos if possible!
My car chassis uses Raycast suspensions, it works at 60 fps but doesn’t works anymore at 30fps and lower or springs gets too hard and goes way too fast at more than 60 fps.
- What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I tried adding this part of script to prevent the script to be fired too often at high fps, but it still doesnt do anything:
local DT = 0
local function Update(delta)
if not workspace.Vehicles:FindFirstChild(tostring(Player.UserId)) then
return
end
local Ratio = 1/(1/delta)
DT += delta
PlayerGui.Menus.DrivingUI.DEBUG1.Text = tostring(Ratio)
PlayerGui.Menus.DrivingUI.DEBUG2.Text = tostring(DT)
if DT < Ratio then return end
DT = 0
(Rest of the code)
also this function is in a RunService.heartbeat loop
30FPS:
60FPS (working):
240FPS: