local part1, part2 = workspace.part1, workspace.part2 local Red = workspace.Red
while true do Red.Humanoid:MoveTo(part1.position) Red.Humanoid:MoveToFinished:Wait= () wait(3) Red.Humanoid:MoveTo(part2.position) Red.Humanoid:MoveToFinished:Wait= () wait(3)
First, it should be Red.Humanoid.MoveToFinished:Wait()
not Red.Humanoid:MoveToFinished:Wait= ()
. Second, you forgot to put an end
at the end of your loop.
local part1, part2 = workspace.part1, workspace.part2 local Red = workspace.Red while true do Red.Humanoid:MoveTo(part1.position, part1) Red.Humanoid.MoveToFinished:Wait() task.wait(3) Red.Humanoid:MoveTo(part2.position, part2) Red.Humanoid.MoveToFinished:Wait() task.wait(3) end