i have this script
while true do local target = game.Workspace.Map.Turn1 script.Parent.Humanoid:MoveTo(target.Position, target) wait() end
and i want it to switch targets once it has reached the first one the first target is Turn1 which is a part then the next target would be End with is another part. but idk how to make it change targets :/ Aditional information - Map is a folder in the workspace - the humanoids walkspeed is 5, but idk if that matters in making it switch targets
You could try use the "humanoid.MoveToFinished:" method Example:
local target = game.Workspace.Map.Turn1 function movenext() target = (OBJECT GOES HERE) -- next target would go here and repeat the process movement() end function movement() wait(1) script.Parent.Humanoid:MoveTo(target.Position, target) script.Parent.Humanoid.MoveToFinished(movenext) end movement()
Hopefully this solves your problem, if you need more help DM on discord. Matt.#8009