I have a cart that i’m moving using CFrame on a track, I need my cart to move AT ALL TIMES on the rail it’s on, even upside down, and be able to do turns like this,
Currently, it works something like this;
The script:
local RunService = game:GetService("RunService")
local Configuration = require(script.Configuration)
local Cart = script.Parent
local Wheels = Cart.Wheels:GetChildren()
RunService.Heartbeat:Connect(function()
Cart:PivotTo(Cart.WorldPivot + Vector3.new(-Configuration.MaxSpeed/60, 0, 0))
end)
Anyone have any ideas, i’ve tried using rays and using the vector normal but it doesn’t really work, i basically want it to move like it’s glued to the rails.