API:Class/Path

Filtered-inheritance mode: While this class technically inherits all Instance class members, some (if not all) have been hidden because they serve no purpose for this object.

NavPath.pngPath : Object Icon.pngInstance

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

If FindPathAsync successfully finds a path between its two points, the returned Path object will have the 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, GetWaypoints and 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

Properties [toggle]

PathStatusStatus [readonly]

The success of the generated Path.

|RMD member="API:Class/Path/Status"|The success of the generated Path.|/RMD|
Status [readonly]
The success of the generated Path.

Functions

FunctionsmemberhiddenFunctions [toggle]

array<PathWaypoint>GetWaypoints ( )

Returns an array of points in the path.

|RMD member="API:Class/Path/GetWaypoints"|Returns an array of points in the path.|/RMD|
arrayGetPointCoordinates ( ) [deprecated]

Deprecated. Do not use.

|RMD member="API:Class/Path/GetPointCoordinates"|Deprecated. Do not use.|/RMD|
Returns an array of points in the path.
GetPointCoordinates ( ) [deprecated]
Deprecated. Do not use.

YieldFunctions

YieldFunctions [toggle]

intCheckOcclusionAsync ( int start )

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

|RMD member="API:Class/Path/CheckOcclusionAsync"|Checks if path is blocked starting at start. Will return the first point of occlusion if blocked, -1 if not.|/RMD|
Checks if path is blocked starting at start. Will return the first point of occlusion if blocked, -1 if not.


|RMD member="API:Class/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 FindPathAsync function. If FindPathAsync successfully finds a path between its two points, the returned Path object will have the 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, GetWaypoints and 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. |/RMD|