PathWaypoint

Show Deprecated

The PathWaypoint data type constructed by a Enum.PathWaypointAction action, Vector3 position, and string label which is used by the PathfindingService to create points along a generated path.

The code block below constructs a PathWaypoint variable with Vector3.new(10, 10, 10) as its position, Enum.PathWaypointAction.Walk as its action, and Custom Label as its label:


local pos = Vector3.new(10, 10, 10)
local waypoint = PathWaypoint.new(pos, Enum.PathWaypointAction.Walk, "Custom Label")

PathWaypoint can also be constructed by passing position and action. Label property will be set to default as empty string.


local pos = Vector3.new(10, 10, 10)
local waypoint = PathWaypoint.new(pos, Enum.PathWaypointAction.Walk)

Action

The Action describes the action to take in order to reach this PathWaypoint. It can be set to one of the following enum values:

NameValueDescription
Walk 0 Walk action needed to reach this waypoint from the previous one.
Jump 1 Jump action needed to reach this waypoint from the previous one.

Summary

Constructors

Properties

Constructors

new

Parameters

position: Vector3
Default Value: Vector3.new(0, 0, 0)
Default Value: Enum.PathWaypointAction.Walk
label: string

Properties

The action to perform at this waypoint.

Position

The 3D position of this waypoint.

Label

The name of the navigation area that generates this waypoint. You can use PathwayPoint.Label to decide the custom action to take to reach the waypoint. PathfindingModifier and Material each have a Label. Automatic jump links have "Jump" as their Label.