How to get all possible paths to a player/part using pathfinding

How to get all possible paths to a player using pathfinding? I just have 4 NPCs and many paths to a target, I would like these NPCs to go to different pahts and make some kind of encirclement

You can use Pathfinding Modifiers. this post goes really into depth about this:

(just go down to the section named Agent Parameters and Pathfinding)

How works pathfinding (it just trying get shortest path)

How i need:

1 Like

Yeah and if the first path(s) are made of Metal for example, you can change the cost of Metal to be like 0.1 so PathFindingService is forced to take the other paths

Or if each path is just one singular part, you can blacklist that part so it has to take the other paths!

I forgot to mention that my map looks like a cave, so I need have to make temp parts for this effect?

Can you show a picture of the cave? You might not need placeholder parts


The map is not yet fully finished. NPCs can walk properly

1 Like

Seeing how your map is made I suggest you just add “nodes” for each point you want the NPC to be able to move to and just use a basic BFS to get all the paths. This will cut out the pathfinding service altogether and allow more control over their movements to you as well.

1 Like