> ## Documentation Index
> Fetch the complete documentation index at: https://pure.saauf.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# EndMovementException - Revoke a Movement Exception

> End an active movement exception for a player using the token returned by BeginMovementException. Also covers ClearMovementExceptions and IsMovementExempt.

Once the movement you authorized has finished, call `EndMovementException` to remove the exception immediately rather than waiting for its timer to expire. This page also covers `ClearMovementExceptions`, which removes every active exception for a player at once, and `IsMovementExempt`, which lets you query whether a player currently holds an exception.

***

## EndMovementException

End a single active movement exception identified by its token.

### Signature

```lua theme={null}
Trace.EndMovementException(player, token) -> boolean
```

**Alias:** `Trace.RevokeMovementException(player, token)`

### Parameters

<ParamField path="player" type="Player" required>
  The `Player` instance whose exception you want to remove.
</ParamField>

<ParamField path="token" type="string" required>
  The token returned by `BeginMovementException` when the exception was created.
</ParamField>

### Returns

<ResponseField name="removed" type="boolean">
  `true` if the exception was found and successfully removed. `false` if no matching exception
  existed for that player and token (for example, if it had already expired or been cleared).
</ResponseField>

### Example

```lua theme={null}
local token = Trace.BeginMovementException(player, {
    Duration = 0,
    Reason = "Cutscene",
})

-- ... cutscene plays ...

Trace.EndMovementException(player, token)
```

***

## ClearMovementExceptions

Remove **all** active movement exceptions for a player - both timed and manual - in a single call.

### Signature

```lua theme={null}
Trace.ClearMovementExceptions(player) -> boolean
```

### Parameters

<ParamField path="player" type="Player" required>
  The `Player` instance whose exceptions should all be removed.
</ParamField>

### Returns

<ResponseField name="success" type="boolean">
  `true` on success.
</ResponseField>

### Example

```lua theme={null}
-- Useful at round end or when a player forcibly leaves a vehicle.
Trace.ClearMovementExceptions(player)
```

***

## IsMovementExempt

Check whether a player currently holds an active movement exception, optionally filtering by a specific check name.

### Signature

```lua theme={null}
Trace.IsMovementExempt(player, check?) -> boolean
```

### Parameters

<ParamField path="player" type="Player" required>
  The `Player` instance to query.
</ParamField>

<ParamField path="check" type="string?">
  The name of a specific anticheat check to query. Valid values are `"Teleport"`, `"Velocity"`,
  `"Fling"`, `"Fly"`, and `"Noclip"`. If omitted, the function returns `true` if the player holds
  an exception for **any** check.
</ParamField>

### Returns

<ResponseField name="isExempt" type="boolean">
  `true` if the player currently has a matching active exception, `false` otherwise.
</ResponseField>

### Example

```lua theme={null}
if Trace.IsMovementExempt(player, "Fly") then
    print("Player is currently exempt from Fly detection")
end
```
