Why the character stop moving before reach the destination?

im using Humanoid:MoveTo() to move the character via command bar


here is the script im using to load the walk animation

local humanoid = script.Parent:WaitForChild("Humanoid")
local pley = humanoid:LoadAnimation(script.Animation)
humanoid.Running:Connect(function(speed)
	if speed > 0 then
		pley:Play()
	else
		pley:Stop()
	end
end)

nothing else. Any thoughts why it stops?

1 Like

Can you show the script that uses MoveTo and the one that defines where it should go? The script that plays the animation should not normally be related to the problem

You can use the MoveToFinished event to trigger stopping the animation.

im using command bar to move the character, the script i use is the same script as i use in command bar. Should i show it

I’m assuming the issue has to do with another part possibly being named Part2. Check other parts to see if they have the same name, or change the name to something more defining like EndPoint.

The OP was asking why the model stops moving, not how to detect when it stops moving.

it triggers before the character reaches the destination, the same position in the video

image
there is only 1 named part2

This could also be due to the fact of Humanoid:MoveTo timing out. It times out after 8 seconds to prevent the MoveToFinished event from never firing, and it could be the case as you run the command at 8-9 second mark in the video, and the character stops moving at around the 16-17 second mark. You can use the script on the developer wiki that continues to run until the destination is reached. Find more information about it here:

Humanoid:MoveTo()

1 Like

i that’s the problem thanks for helping

1 Like