Raycast suspension help

everything works fine until i sit in the seat and the entire car falls down
my character is massless the exact moment i sit in the seat
then when i get out of the seat the car goes flying

code:

-- damping = 0.1
-- stiffness = 1
-- height = 3
-- origin = above the wheels

local dist = (origin - result.Position).Magnitude
local length = math.clamp(dist - wheelRadius, 0, height)
local suspensionVelocity = mainPart:GetVelocityAtPosition(origin)

local force = -(damping * mainPart.AssemblyMass) * suspensionVelocity.Y - (stiffness * mainPart.AssemblyMass) * (length - height)

mainPart:ApplyImpulseAtPosition(Vector3.new(0, force, 0), result.Position)
1 Like

it was because the player was the network owner