This is a yielding function. When called, it will pause the Lua thread that called the function until a result is ready to be returned, without interrupting other scripts.
This function has been superseded by the sequential method of calling
PathfindingService/CreatePath|PathfindingService:CreatePath() followed by
Path/ComputeAsync|Path:ComputeAsync(). This lets you create a
Path object using various custom parameters and then compute or re-compute a path on the same object if any dynamic changes within the place block the path.
The FindPathAsync() function is used to find a path between two provided points. This path uses the navigation grid created by
PathfindingService and makes sure that the path can be followed by a regular-sized Roblox character.
This function returns a
Path object which contains the coordinates of the path. If no path is found between the two points, this function will still return a
Path object, but that object’s
Path/Status will be
To get the waypoints of a
Path object, you can use the
Path start coordinates.
Path finish coordinates.