How does Humanoid:WalkToPart() work?

I tried putting the location of the part in the argument but it didn’t work. Would appreciate an example.

do you mean Humanoid:MoveTo()

There is a resource I found about Humanoid:WalkToPart() here: Humanoid.WalkToPoint.

I don’t have experience with this but this might teach you and help out alot. They also have example code

ooh walk to point, im not sure either lol

1 Like

Not WalkToPoint. Humanoids have a WalkToPart property it seems.

https://gyazo.com/7ae3e7d7089233db3c5c73ad63bb2ffb

Oh whoops…

This should do it: Humanoid.WalkToPart

Found this on the dev hub:

goal = humanoid.WalkToPart.CFrame:pointToObjectSpace(humanoid.WalkToPoint)

(From dev hub)

WalkToPart is a reference to a part that the Humanoid is trying to reach. This property is normally set when a part is passed as the 2nd argument of the Humanoid’s Humanoid:MoveTo function.

When WalkToPart is set and a humanoid is actively trying to reach the part, it will keep updating its Vector3 goal to be the position of the part, plus the Humanoid.WalkToPoint translated in object space relative to the rotation of the part

3 Likes