PcoWSkbVqDnWTu_dm2ix
The Developer Hub is now deprecated and information on this page may no longer be accurate. To see our new and improved documentation, please click here. You can read more about the future of documentation here.
Collapse Sidebar

PathWaypoint

PathWaypoint

A datatype constructed by a Enum/PathWaypointAction action and DataType/Vector3 position which is used by the PathfindingService to create points along a generated path.

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

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

Action

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

Name Value Description

Walk

0

Walk action needed to reach this waypoint from the previous.

Jump

1

Jump action needed to reach the this waypoint from the previous.

Constructors

PathWaypoint.new ( Vector3 position = Vector3.new(0, 0, 0), Enum action = Enum.PathWaypointAction.Walk )

Returns a PathWaypoint object from the position and enum/PathWaypointAction provided.

Properties

Enum PathWaypoint.Action

The action to be performed at this waypoint.

Vector3 PathWaypoint.Position

The 3D position of the waypoint.