# Help to calculate Stiffness/Damping on Suspension

Hi guys, I am having some trouble while making a car suspension, it’s very bumpy, here’s code;

``````local Mass = 0

for i,v in pairs(script.Parent.Parent:GetDescendants()) do
if (v:IsA("BasePart") or v:IsA("MeshPart")) then
Physics:SetPartCollisionGroup(v,"Chassis")
if not (v.Massless) then
Mass += v:GetMass()
end
end
end

Mass = Mass * workspace.Gravity
Configurations.SpringConstraint.MaxForce = Mass
Configurations.SpringConstraint.Stiffness = Mass/2

for i,v in pairs(Constraints:GetChildren()) do
if (v:IsA("SpringConstraint")) then
v.Stiffness = Configurations.SpringConstraint.Stiffness
v.Damping = Configurations.SpringConstraint.Damping
v.LimitsEnabled = true
v.MinLength = 1
v.MaxForce = Configurations.SpringConstraint.MaxForce
v.FreeLength = Configurations.SpringConstraint.FreeLength
end
end
``````

And here’s configurations

``````return {
Gears = {
[1] = {Speed = 40; Torque = 5000;};
[2] = {Speed = 0; Torque = 0;};
[3] = {Speed = -60; Torque = 1000;};
[4] = {Speed = -120; Torque = 900;};
[5] = {Speed = -180; Torque = 700;};
[6] = {Speed = -240; Torque = 500;};
[7] = {Speed = -300; Torque = 350;};
[8] = {Speed = -360; Torque = 200;};
};
BrakePower = 2000;
SteeringSpeed = 1;
SpringConstraint = {
Stiffness = 0; -- Changed later
Damping = 40;
MaxForce = 0; -- Changed later
FreeLength = 2.25;
};
};
``````

Result;

Can someone help me out?
I can give a repro file if needed