As the title, i want to stop my MoveTo() when something triggered.

while Fighting.Value == false do
	if Fighting.Value == false then
		Noob.Humanoid:MoveTo(Part.Position) --if i triggered here, it still went to the Part until he finished.
		Noob.Humanoid.MoveToFinished:wait()
	end
	wait(math.random(3))
	if Fighting.Value == false then
		Noob.Humanoid:MoveTo(Part2.Position) --if i triggered here, it still went to the Part 2 until he finished.
		Noob.Humanoid.MoveToFinished:wait()
	end
	wait(math.random(5))
end

3 comments

1

Why don't you have the player move to it in increments so you can stop it whenever you want.

0

You can set the walkspeed to 0 when something happens.

0

What is the trigger event you're trying to use to stop the movement?