How to make a humanoid follow a specific path to move

hello devforum

so basically im trying to make a humanoid follow a specific path, its pretty much gonna be like what cores use to move in portal 2.
another example of what im trying to achieve can be seen in tunneler
how can i do this?, do they use animations or…?

1 Like

The pathfinding service


oh, yeah pathfinding can be useful but about making it fly, how can i achieve that?

Humanoids have a function called


which is used on their humanoid. For example, you can use the argument

Humanoid:MoveTo(part.Position) -- where the humanoid is the humanoid in your NPC,
--followed by the part where it will move to in the brackets

Using this method, you can create an outline of where you want the humanoid to travel to, by laying out parts.

I use this method in my game ELIMINATE.

A reference article of it in action: Moving NPCs Between Points

oh, thanks for the info but what about making it fly?

You can use an animation for that part. Or, you can tween the model to parts (the parts would be anchored in the air, and floating), so once you tweened the model position, it too would be floating. Hope this helps :slight_smile:

1 Like

This isn’t animated. The path of this bot is deterministic, so you can probably just move it independently through a tween or something similar so long as you’ve set your path right. Roblox pathfinding is really only good for non-deterministic humanoid movement across arbitrary spaces.

1 Like