How would you go about making a scripted suspension?

I have a vehicle chassis, but I want to go another level and add a suspension. What

should I choose, a scripted suspension, or a Mechanical suspension? I heard that

Jailbreak uses a scripted suspension, also I heard that they are WAY Better than a

mechanical suspension. But How exactly would I learn how to make a scripted

suspension (Other than using the racing template in roblox studio)? How can I

understand how they work, and know how to make one? I tried searching Youtube,

Devforum, but that still does not answer my question. I need a tutorial that explains

the following: How to build a chassis that can support that, how to script the chassis,

and lastly make the chassis / vehicle easy, and fully customizable. If someone could tell

how to do what I explained, that would be Awesome!

(FYI: I made the topic easier to read)

1 Like

Take a look at the car in the ‘Suburban’ map when you go to Roblox Studio and click the ‘New’ tab. You’ll be showed a selection of template games.

In the Suburban map is a vehicle with scripted suspension.

The way to go around it is using upwards thrust and spring/dampener equations. However be warned ‘scripted suspension’ does not work well in laggy environments this is the same for Jailbreak and Mad City on slow devices.

I should be writing a blog post about custom vehicle systems in the near future.

1 Like

Thx but will I have to use the chassis in the suburban map? Or can I use that script with any chassis (So long as the wheels are given specific names)?

EDIT: Also Does that script contain more than just a suspension script? I see a localscript in there that is disabled. Is that the suspension? Or is it just an alternative to the DriveScript? And I want to know how to change the acceleration in there (Because it is way to high for me )

You can put the vehicle in any map you like.

However I recommend looking at the scripts and learning.
The suspension is around line 60 of that disabled script where there are changes made to the bodyThrust object.


I am going to accept the solution right here, because I will just edit the script from here. Thx @opplo! Anyone else, feel free to give me more tips / tricks.

EDIT: I still need some tips, and tricks anyways, And I do appreciate them as well.

1 Like

You could try using Cylindrical and Spring constraints as a non-scripted solution, I’ve also experimented and found out that low density tires each tire having a mass of about 0.05 to 0.1 work better with getting over obstacles, you might have to also change the density of the cars body however and adjust the physics of the spring constraints. Although its not as profound as a scripted solution, the effect of the suspension is very similar counting that this is a physics based option.

(I would send a screenshot of what the constraints look like for my chassis, however studio isn’t working for me at the moment, I will try and get back to you once studio is fixed!)

1 Like

How do I get a mass of 0.05 on the tires?

EDIT: How do I determine / Estimate the Mass of the tires?

So for the actual tire, you want to scroll down in the properties tab and checkmark the box that says “CustomPhysicalProperties” a new section should open where you can edit the density.

When experimenting, i’ve found that vehicles with more parts of them generally like to have a little bit of more density to the wheels because i’ve had a time where the wheels would just fly everyone (when the parts vehicles body densities are set to 0.01 which is the lowest.)

So generally more massed parts = more density to the wheel, and less mass = less density.

BUT Roblox has finally added a massless feature which is really helpful, you can checkmark it under the properties tab of a part to ignore the vehicles body in which you can use 0.05 as the tires density.

You don’t generally want to set the mass of the wheels to 0.04 and lower because in most cases the wheels would just fly everywhere. The goal of balancing the density is to allow the vehicle to stay on top of the spring constraints.

Please ask if you need any clarification as this could be quite confusing sometimes!

1 Like

So Density = Mass / Mass = Density?

You wouldn’t really need to calculate density for the wheels, just make them from about 0.05 to 0.1, its just like an adjustable setting almost for the chassis in which it works best. Less density for the wheels just makes the wheels lighter and makes it easier for the wheels to overcome obstacles. 0.05-0.1 is the best setting for wheels where they don’t glitch out and fly away.

1 Like

C(N/m) = F(N) / u(m)
F(N) = m(KG) * a(m / s^2)
Mass = Density * Volume

Would be the basic formula.
Where C is the force of the spring and F is the gravitational force, for example: 50KG * 9.81 = 490.5N Then you could use u(m) to calculate what upward force you need to give it. I haven’t tested it, but let me know if it worked.

1 Like

(post withdrawn by author, will be automatically deleted in 1 hour unless flagged)

6 posts were moved out for being off topic and bumping.