Help, I have this script that moves a car when it is anchored. It only moves once. How do I make it that it moves forever?
--something not to worry about while true do script.Parent.Parent:MoveTo(Vector3.new(1,0,0)) wait(0.1) end
You can do Vector3 + Vector3
like this:
while true do script.Parent.Parent:MoveTo(script.Parent.Parent.PrimaryPart.CFrame.p + Vector3.new(1,0,0)) wait(0.1) end
add a "while loop" it will make it go on forever
Wait, it only goes to a specific location. How do I make it move on one axis?
The issue is that in the while loop, you are always moving the car to the exact spot. To make it move one direction, you should change the x, y, or z axis, depending on what direction. Please accept my answer if it helps out!