Issues with raycast based chassis bellow 30fps and beyond 60fps

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!

I want my car chassis springs to work at any fps.

  1. 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.

  1. 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:

did u fix it yet? i am facing same problem.

This is just equivalent to local Ratio = delta So your condition if DT < Ratio then return end becomes if DT < delta then return end

The way you are using deltatime is incorrect in this case, could you share the rest of the suspension code

Please share the equation that you are using to calculate the suspension forces.