I'm trying to make a car that "hovers", similar to the jailbreak cars, and I made a couple lines of code to try to stop it from drifting sideways. But whatever I do, I just can't get it to work :(
DriftStopper = Instance.new("BodyForce") DriftStopper.Parent = Body while true do DriftStopper.Force = -(Body.Velocity * Body.CFrame.lookVector).X * traction * Body.CFrame.RightVector end
Well I solved it. Basically I have no idea how vectors work, so I went to the discord and got:
DriftStopper.Force = -Body.CFrame:VectorToWorldSpace(Vector3.new(Body.CFrame:VectorToObjectSpace(Body.Velocity).X,0,0)) * traction
Locked by User#24403
This question has been locked to preserve its current state and prevent spam and unwanted comments and answers.
Why was this question closed?