PcoWSkbVqDnWTu_dm2ix
Collapse Sidebar

MoveToFinished

This event fires when the Humanoid finishes walking to a goal declared by the Humanoid/WalkToPoint and Humanoid/WalkToPart properties.

The Humanoid/WalkToPoint and Humanoid/WalkToPart properties can be set individually, or using the Humanoid/MoveTo function.

If the Humanoid reaches its goal within 8 seconds, this event will return with reached as true. If the goal is not reached within 8 seconds the Humanoid will stop walking and reached will be false. This timeout can be reset be calling Humanoid/MoveTo again within the timeout period.

Parameters

Name Type Default Description

A boolean indicating whether the Humanoid reached is goal. True if the Humanoid is reached its goal, false if the walk timed out before the goal could be reached


Code Samples


Humanoid MoveTo Without Time out

This code sample includes a function that avoids the 8 second timeout on Humanoid/MoveTo by calling Humanoid/MoveTo again before the timeout elapses. It also includes an optional andThen parameter where developers can pass a function to be called when the humanoid reaches its destination.