Hand-written by Joseph San Nicolas, Roblox Developer
PathWaypoint
Constructors
| Name | Description |
| new(position: Vector3, action: Enum.PathWaypointAction, label: string) | Creates a PathWaypoint at the given position with the given action and navigation area label. |
Code Snippet
local PathfindingService = game:GetService("PathfindingService")
local path = PathfindingService:CreatePath()
path:ComputeAsync(humanoidRootPart.Position, targetPosition)
for _, waypoint in path:GetWaypoints() do
if waypoint.Action == Enum.PathWaypointAction.Jump then
humanoid.Jump = true
end
humanoid:MoveTo(waypoint.Position)
end
Properties
| Name | Type | Description |
| Position | Vector3 | The 3D position of this waypoint. |
| Action | Enum.PathWaypointAction | The action to perform at this waypoint. |
| Label | string | The name of the navigation area that generated this waypoint. Automatic jump links have "Jump" as their label. |