Flinging Car Physics (cry for help)

For example when you click the car door, it Humanoid:Sits you on the seat depending on which door you click. My problem is, if everything has no mass including characters, why does the game feel the need that the cars need to be flung around the map. What can I do to prevent the Roblox physics from teleporting my cars all around when entering, exiting, and sometimes driving.

2 Likes

Depends on the way ur making the car, just use cylindrical and spring constraints and a body mover. That’s the simplest and best way to create cars.

1 Like

Are you sure about that? I had the same issue earlier, and it was a normal car with nothing that makes the car fling or anything else

I use that and never experienced it.

1 Like

Things like that have happened to me before, you may wanna check your Cylindrical Constraints and Spring Constraints

1 Like

can it be that the player is colliding with the car especially the car body

The car and players have separate collision

What exactly do you recommend with the constraints? What should I tweak in particular?

1 Like

are you using spring constraints? if yes put their stiffness lesser cuz i had the same problem when i put the stiffness so high that it flinged me into outer space lol

1 Like

In particular the stiffness. You will have to do this with what conditions you have currently which can enable the springs. So suppose I made it so that the constraints only works when a player is sitting, I will have to probably manually enable the constraints. And not necessary but you should check for anchored parts.

1 Like

Now is it best I keep the activation of constraints server sided? As if the seat is detecting who sits down? Or client sided, where the seat gives the player a client to manually activate it on his end. I was just thinking only the driver should be able to enable/disable constraints/springs. Because currently I just rig them manually and :clone(). Should I script the constraints as the vehicle spawns?

You should have the cars rigged initially, cloning constraints is not at all the best, maybe that’s what is causing the flinging. You can always set the network ownership to the player and have a local script on the client. But rigging the car during runtime is not the best, performance wise too.

Yea the way its set up is everything is rigged, and when a player is added he is given Network ownership, but I think it would be a better idea to assign the network ownership as soon as the car spawns to the player and keep it like that even if the player exits the car, because when the exit, I set the network ownership to auto. Maybe that would stop that

1 Like