We use cookies on this site to enhance your user experience

Path

Path

Path objects store the result of paths found by PathfindingService. Paths cannot be created with Instance.new – they can only be created with the PathfindingService/FindPathAsync function.

If FindPathAsync successfully finds a path between its two points, the returned Path object will have the Path/Status Success. Otherwise the status will be NoPath. NoPath occurs when there is no way for a regular sized Roblox character to move between the two points given to FindPathAsync. This can happen if there are obstacles between the two points with no way around, or if the points are inside of solid objects.

Paths have two functions, Path/GetWaypoints and Path/CheckOcclusionAsync. GetWaypoints returns a list of Waypoints that represent the points a character should follow in sequence to get from the beginning to the end of the path. CheckOcclusionAsync checks if the path is still good.


Properties

Name Type Description
PathStatus

The success of the generated Path.

Inherited from Instance

Archivable ClassName DataCost Name Parent RobloxLocked

Functions

Name Type Description
int

Checks if path is blocked starting at start. Will return the first point of occlusion if blocked, -1 if not.

Array

Returns an array of points in the path.

Inherited from Instance

ClearAllChildren Clone Destroy FindFirstAncestor FindFirstAncestorOfClass FindFirstAncestorWhichIsA FindFirstChild FindFirstChildOfClass FindFirstChildWhichIsA GetChildren GetDebugId GetDescendants GetFullName GetPropertyChangedSignal IsA IsAncestorOf IsDescendantOf WaitForChild