Humanoid.MoveToFinished fires too early

I’m creating a function where an NPC walks to a point and then turns to a specific direction. I have them walk, then at Humanoid.MoveToFinished I tween their RootPart’s CFrame. However, Humanoid.MoveToFinished always fires before they are actually done walking so it looks bad. Any ideas to fix this?

If you call MoveTo before MoveToFinished fires for another MoveTo, this happens. Probably. It’s not easy to tell what the issue is with a lack of provided code - providing the code in use or the specific snippet with the MoveTo functions would be helpful.

I believe that :MoveTo() times out after 8 seconds, so you might need to call it a couple times before it reaches its destination.

1 Like

I’ve come into that problem before, it is the sad truth that roblox only allows up to 8 seconds. If the humanoid hasn’t reached its desired destination under 8 seconds, the MoveToFinished() will fire. What I did to fix this was when the MoveToFinished() was fired, it would then check the distance between the HumanoidRootPart and the destination using magnitude. If it was more than 2 studs away, it would fire MoveTo() again.

5 Likes