Skip to content

Service · inherits Instance

PathfindingService

Official docs ↗

Used to find logical paths between two points.

About PathfindingService

PathfindingService is used to find logical paths between two points, ensuring that characters can move between the points without running into walls or other obstacles. By default, the shortest path is calculated, but you can implement pathfinding modifiers to compute smarter paths across various materials, around defined regions, or through obstacles.

See Pathfinding for details on implementing character pathfinding.

Methods 1

  • CreatePath(agentParameters: Dictionary = nil) → PathCreates a Path object based on the given agent parameters.

    Creates a Path object based on various agent parameters. Valid keys and values in the agentParameters table are as follows:

PathfindingService also has every member of Instance. Deprecated and Roblox-only members are hidden.

Reference text from the Roblox Creator Documentation, licensed CC BY 4.0, reorganized by rbxtoolshub.com · Studio 0.743.0.7431133.