Vehicle's Weird Behavior When Players Are Standing On It

I have a part in my script that makes the players hats invisible when they get on the car, but apart from that there is nothing else that changes the humanoid.

try apart of that script, maybe it fix

When a character is standing/moving around on your vehicle, they apply an equal and opposite force on the vehicle as well. This will have a similar effect as having a “BodyForce” applied down on the points your character are standing. If your car is light enough its possible for the characters to push on the car a bit.

How heavy are you cars?

Some car games I play have this issue where you would jump on a car a couple times and it would start to glitch out, probably a similar thing.

I still think it has to do with the springs. My most recent project, which I even made a post on, was a weight measuring device.
It used four springs. Perfectly balanced. If I would drop a block on it the platform would go down a bit and then stop.
However, when I would stand on the platform, it would go down, stay down for about half a second, and go up slightly.
Making the springs stiffer might change something.

Here is how I get it:
image

The car’s mass customphysicalproperties is this:
image

The car’s mass part is this red part:
image
I do this so other parts in the car doesn’t cause an imbalance of its weight. Each wheel have a mass of 1 because through some testing I figured out that if you make your wheels too light, you wont get any traction to the floor and the car will not turn

Prob a Roblox error, you can ignore it like others games I think.

I can’t really ignore it because in my game players will be able to jump on the cars and it will disrupt the driver. It might even cause the car to glitch out, and it could be abused easily.

If anyone is wondering, this is a custom built car system, I am not using other prebuilt systems like ‘a-chassis’ for example.

Yes, I was playing it and it surprised me, I like that you added that when turning the turn signals turn on. Gw

1 Like

Your car is probably over constrained, causing the simulator to go crazy.
If your car really is mass 213 and your wheels are mass 1, you have a really high mass ratio. Putting players on top of the car exacerbates it by making it even more massive. Have you tried bringing your wheels a little closer to the chassis’s weight? In fact I would suggest you increase the density of your car parts overall.

Here I resized the mass part to fit the actual size of the car
e2867c0fefa9364a0f1baa8290690dc6
Causes the same behavior

Here I lowered the weight of the car:
91a7829e58cd9e4ebab722b4f007aea7
Doesn’t change anything :confused:

If I change the mass of the wheels, the car will have trouble trying to move the wheels as the cars torque will be too low for it to move the wheels.

I don’t think changing the mass of the car/wheels will affect it as in my previous post you can see that NPC’s with their own humanoid don’t cause this issue with the vehicle, only players cause this.
8b46d0d0e5a1a43761ca504255e89ffb

1 Like

Unless you really need those collisions, you can just filter out regular players colliding with vehicles with collision groups.

1 Like

Assembly Mass for your first “repro” is still 213 In the second video its only 162. If your wheels try have mass of only 1 you are still going to have issues.

A mass ratio of 1 to 162 and the mass ratio of 1 to 213 are still going to be too high. Bringing them closer to 1 to 10 or 1 to 20. NPCs standing on your car don’t have the same behavior because they are probably owned by the same person and do some extra NPC-specific optimizations.

I imagine if you call SetNetworkOwner(nil) on the NPCs you will see the same problem.

2 Likes

It is fixed now!
I did not know having a large difference between density ratios could cause this!

Thank you!!!
41d1197cfd6e3061ca9fabe03e4e1e67

2 Likes

Congratulations, I hope to see your game on the main page!

2 Likes

Glad you figured it out! I’m going to ask internally if we have this specific issue documented well on user-facing sources. Building physically-simulating cars (suspensions and what not) is pretty demanding in Roblox. It is really easy to build something super unstable without really know that it is unstable. We’re always working on trying to make things like this easier and more obvious, but it can be really difficult due to the nature of how complicated real-time physics solvers are.

3 Likes

Awesome, I could make a long list of things to watch out for when makings a car with constraints. Other than that if you are wondering why I had my cars density so high was to make it sink in water, because with this lighter density it will float like a boat!

1 Like

Maybe putting a skin/body on top of the car (like a NASCAR) might lead to some clues to the problem, I’m sure if you’ll be using that car in a game, so you’ll probably going to be adding a body to the car anyways to make the car look like a real car. Also the car also might be unbalance.

3 Likes

I will eventually be adding a car body, but as of now I am working on how the car system works! I don’t want to waste time trying to find a nice car model instead of working on improving the chassis.

1 Like

Aha, I found this:

This is a good place to look at with Roblox Physics. It talks about mass-ratio issues and debugging. Would love feedback on the information provided there!

2 Likes