Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How can I stop a "hover-car" from drifting sideways?

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

1 answer

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

This discussion is preserved as it was. New answers, comments, and votes are closed.