# Path

Roblox Engine API class from Roblox Studio 0.744.0.7441077 (version-7aaa6838d36c4448).

- Inherits from, nearest first: [Instance](https://rapi.sleaze.dev/classes/Instance.md), [Object](https://rapi.sleaze.dev/classes/Object.md)
- Tags: Not creatable, Not replicated
- Memory category: Instances
- HTML page: https://rapi.sleaze.dev/classes/Path/
- Roblox documentation: https://create.roblox.com/docs/reference/engine/classes/Path

Stores the result of paths created by [`PathfindingService:CreatePath()`](https://rapi.sleaze.dev/classes/PathfindingService.md).

## Properties

### Status

```luau
Path.Status: Enum.PathStatus
```

- Tags: Read only, Read capabilities: Basic, Save only

The `PathStatus` of the generated [`Path`](https://rapi.sleaze.dev/classes/Path.md).

## Methods

### CheckOcclusionAsync

```luau
Path:CheckOcclusionAsync(start: number): number
```

- Tags: Yields, Capabilities: Basic

Checks if a path is blocked starting at a specific waypoint.

Parameters:

- `start`: The 1-based index of the waypoint from which to begin checking for occlusion.

Returns: The 1-based index of the first blocked waypoint starting from `start`, or `-1` if the path is not blocked.

### ComputeAsync

```luau
Path:ComputeAsync(start: Vector3, finish: Vector3)
```

- Tags: Yields, Capabilities: Basic

Computes a [`Path`](https://rapi.sleaze.dev/classes/Path.md) from a start position to an end position.

Parameters:

- `start`: The world position where the computed path begins.
- `finish`: The world position where the computed path finishes.

### GetWaypoints

```luau
Path:GetWaypoints(): { any }
```

- Tags: Capabilities: Basic

Returns an array of points in the path.

Returns: An array of `PathWaypoints` ordered from path start to path end.

### GetPointCoordinates

```luau
Path:GetPointCoordinates(): { any }
```

- Tags: Deprecated, Capabilities: Basic
- Use instead: [`Path.GetWaypoints`](https://rapi.sleaze.dev/classes/Path.md)

**Deprecated:** This item has been superseded by [`GetWaypoints()`](https://rapi.sleaze.dev/classes/Path.md) which should be used in all new work instead.

Returns a table of [`Path`](https://rapi.sleaze.dev/classes/Path.md) instances.

Returns: An array of [`Vector3`](https://rapi.sleaze.dev/index/types/Vector3.md) positions for each waypoint in the path.

## Events

### Blocked

```luau
Path.Blocked: RBXScriptSignal<(blockedWaypointIdx: number)>
```

- Tags: Capabilities: Basic

Fires when the computed path becomes blocked.

### Unblocked

```luau
Path.Unblocked: RBXScriptSignal<(unblockedWaypointIdx: number)>
```

- Tags: Capabilities: Basic

Fires when a computed path that was blocked becomes unblocked.

## Inherited members

- From [Instance](https://rapi.sleaze.dev/classes/Instance.md): `Archivable`, `archivable`, `Attributes`, `AttributesReplicate`, `AttributesSerialize`, `HistoryId`, `Name`, `Parent`, `PredictionMode`, `PropertyStatusStudio`, `RobloxLocked`, `SerializedOverrides`, `SourceAssetId`, `Tags`, `UniqueId`, `numExpectedDirectChildren`, `DataCost`, `Capabilities`, `DefinesCapabilities`, `IsInSandbox`, `Sandboxed`, `AddTag`, `ClearAllChildren`, `Clone`, `Destroy`, `FindFirstAncestor`, `FindFirstAncestorOfClass`, `FindFirstAncestorWhichIsA`, `FindFirstChild`, `FindFirstChildOfClass`, `FindFirstChildWhichIsA`, `FindFirstDescendant`, `GetActor`, `GetAttribute`, `GetAttributeChangedSignal`, `GetAttributes`, `GetChildren`, `GetDebugId`, `GetDescendants`, `GetFullName`, `GetStyled`, `GetStyledPropertyChangedSignal`, `GetTags`, `HasTag`, `IsAncestorOf`, `IsDescendantOf`, `IsPropertyModified`, `QueryDescendants`, `RemoveTag`, `ResetPropertyToDefault`, `SetAttribute`, `WaitForChild`, `Remove`, `children`, `clone`, `destroy`, `findFirstChild`, `getChildren`, `isDescendantOf`, `remove`, `AncestryChanged`, `AttributeChanged`, `ChildAdded`, `ChildRemoved`, `DescendantAdded`, `DescendantRemoving`, `Destroying`, `StyledPropertiesChanged`, `childAdded`
- From [Object](https://rapi.sleaze.dev/classes/Object.md): `ClassName`, `className`, `GetPropertyChangedSignal`, `IsA`, `isA`, `Changed`
