I’m making a simple cart ride game and I’m just having ALOT of issues with the cart. It won’t stay on the track properly, it flips around when you get in it, the cart jitters when running, and more. If you can help me that would be great.
jittering clip
getting stuck on ramp slow
sitting problem
CODE SNIPPET
local cart_on = script.Parent.Parent.CartOn
game:GetService("RunService").Heartbeat:Connect(function()
local speed = script.Parent.Parent.Speed.Value
if cart_on.Value == true then
local look = script.Parent.CFrame.lookVector * speed
script.Parent.BodyVelocity.Velocity = script.Parent.CFrame:VectorToObjectSpace(Vector3.new(0, -15, speed))
else
script.Parent.BodyVelocity.Velocity = Vector3.new(0, -5, 0)
end
print(script.Parent.BodyVelocity.Velocity)
end)
Theres a body force set to 0,-95000,0
and the Body Velocity’s MaxForce is set to 100000, 0, 100000