So I’m trying to have cars that go around in loops and so far the script was working fine until I noticed when it comes back it’s like 2 studs away from the position it started.
while true do
wait()
for i = 1,32 do
script.Parent.CFrame = script.Parent.CFrame + Vector3.new(0,0,-4)
wait()
end
for i = 1,10 do
script.Parent.CFrame = script.Parent.CFrame + Vector3.new(0,0,-3)
wait()
script.Parent.CFrame = script.Parent.CFrame * CFrame.Angles(0,math.rad(9),0) * CFrame.new(0,0,4)
wait()
end
for i = 1,100 do
script.Parent.CFrame = script.Parent.CFrame + Vector3.new(-4,0,0)
wait()
end
for i = 1,10 do
script.Parent.CFrame = script.Parent.CFrame * CFrame.Angles(0,math.rad(18),0) * CFrame.new(0,-1,0)
wait()
end
for i = 1,100 do
script.Parent.CFrame = script.Parent.CFrame + Vector3.new(4,0,0)
wait()
end
for i = 1,10 do
script.Parent.CFrame = script.Parent.CFrame + Vector3.new(0,0,3)
wait()
script.Parent.CFrame = script.Parent.CFrame * CFrame.Angles(0,math.rad(-9),0) * CFrame.new(0,0,4)
wait()
end
wait()
for i = 1,32 do
script.Parent.CFrame = script.Parent.CFrame + Vector3.new(0,0,4)
wait()
end
for i = 1,10 do
script.Parent.CFrame = script.Parent.CFrame * CFrame.Angles(0,math.rad(-18),0) * CFrame.new(0,1,0)
wait()
end
end