We use cookies on this site to enhance your user experience
Collapse Sidebar


Show deprecated


Show deprecated

PathfindingService is used to find paths between two points. These paths make sure that characters can move between the points without running into walls or other obstacles. Paths can be used for both player-controlled characters and non-player characters.

This service has one function, PathfindingService/CreatePath|CreatePath(), which creates a Path object based on various parameters.

See the Articles/Pathfinding|Pathfinding guide for details and examples on using pathfinding in Roblox.

Navigation Mesh

PathfindingService generates a “navigation mesh” over all parts in a place while the game is running. Any path that is created with the service will stay within the mesh. If the geometry of the place changes — for example, if a part is created or a part moves — the navigation mesh will be recalculated.

To see the navigation mesh for a place:

  1. Open the place in Studio.
  2. Navigate to FileSettings….
  3. In the Studio tab, under Visualization, toggle on the Show Navigation Mesh setting. The mesh will then show up in the 3D view.

The purple areas show where a character can walk, while the non-colored areas are considered blocked. Studio also displays arrows on top of the mesh which show where a character would have to jump to reach one part of the mesh from another.




CreatePath ( Dictionary agentParameters )


FindPathAsync ( Vector3 start , Vector3 finish )

[Yields] re-compute a path on the same object if any dynamic changes within the place block the path.">[Deprecated]

Finds a Path between the two provided points