I found this line of code in the roblox jeep that changes the amount it tilts whenever the vehicle accelerates / turns. But I changed it so the vehicle tilts way more. But whenever I accelerate, the vehicle will slowly (but surely) fly of the ground (Like an airplane taking of a runway). I would like to know how to stop this from happening. Here is a video with an example of the issue happening:
Here is the modified jeep:
Is there any way, that I can stop this from happening?
Also, here is the line of code that I changed: 160, and I changed the local Car script localscript
(If I am not mistaken) The mass, is not going to fix this. (It uses velocity to move forward or backward, or even turn! So if the vehicle is tilting on a certain axis it will move in that direction. So if the vehicle is moving, and is tilting upward in the correct axis, and you are moving forward the vehicle will try to “take of a runway”)
Is it using BodyVelocity to move forwards? if that is the case you would probably wanna make the MaxForce.Y to 0, as that will negate any effect that BodyVelocity Y axis has. If you however do not use a BodyVelocity, the best solution probably would be to have a VectorForce/BodyForce in the car with the Force being Vector3.new(0, -BodyMass * workspace.Gravity, 0).
Will this work, if I apply this force in a BodyForce separately from the force that moves the vehicle?
Last question… don’t worry ;)!
Edit:
I will try this all out tomorrow or the day after! Thanks for helping me out man, I really appreciate your contribution / answers to this thread / topic.
Probably yeah. If it doesn’t work with BodyForce try to do it with VectorForce. Please let me know the results once you’ve tried it, and if it worked mark my original post as the solution