> ## 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.

# AllowTeleport - Authorize a Brief Teleport Exception

> Grant a brief teleport exception before using PivotTo or direct CFrame moves. Covers all anticheat checks to prevent false flags on server teleports.

Whenever your game moves a player's character with `PivotTo`, a direct `CFrame` assignment, `TeleportService`, or any other server-side teleport, you should call `AllowTeleport` first. It opens a short exception window covering all movement checks so the anticheat system does not flag the sudden positional change. `AllowTeleport` is a focused shorthand - it is equivalent to calling `BeginMovementException` with all five checks enabled, but with a simpler parameter set.

## Signature

```lua theme={null}
Trace.AllowTeleport(player, duration?, reason?) -> token?, error?
```

## Parameters

<ParamField path="player" type="Player" required>
  The `Player` instance to grant the teleport exception to.
</ParamField>

<ParamField path="duration" type="number?">
  How long, in seconds, the exception window should remain open. If omitted, Trace uses a short
  default window sufficient for most instantaneous teleports. Pass a larger value when the teleport
  may take several seconds to complete (for example, when using `TeleportService` across places).
</ParamField>

<ParamField path="reason" type="string?">
  A human-readable description of the teleport. Written to Trace's moderation logs and visible in
  the Trace dashboard.
</ParamField>

## Returns

<ResponseField name="token" type="string?">
  A token you can optionally pass to `EndMovementException` if you need to end the exception
  before `duration` expires. For fire-and-forget teleports you can discard this value and let the
  exception expire naturally. Returns `nil` on failure.
</ResponseField>

<ResponseField name="error" type="string?">
  A description of what went wrong. Only present when `token` is `nil`.
</ResponseField>

## Examples

### Round spawn teleport

Open a 2-second window, then move the character. The window expires on its own:

```lua theme={null}
Trace.AllowTeleport(player, 2, "Round spawn teleport")
player.Character:PivotTo(roundSpawn.CFrame)
```

### Cross-place teleport with TeleportService

Use a longer window to cover the time `TeleportService` takes to initiate the transfer:

```lua theme={null}
Trace.AllowTeleport(player, 5, "Teleport to minigame")
game:GetService("TeleportService"):TeleportToPlaceInstance(
    placeId, instanceId, player
)
```

<Tip>
  For short, one-shot teleports you can also use
  [`WithMovementException`](/api/with-movement-exception) with `Checks = {"Teleport"}`. It is
  equally effective and automatically cleans up the exception the moment your teleport call
  returns - no timer needed.
</Tip>
