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

# Movement Zones - Authorize Areas in Your Game World

> Register Workspace parts or models as movement zones. Players inside the zone are automatically exempt from selected anticheat checks.

Movement zones let you define persistent areas in your Workspace where players automatically receive movement exceptions while they are inside. You register a `BasePart` or `Model` once - at startup or whenever the feature initializes - and Trace handles the per-player exemption logic for you. As soon as a player enters the zone, the configured checks are suspended; as soon as they leave, the exceptions are removed. You do not need to track players yourself.

Common use cases include launch pads, speed booster pads, vehicle tracks, conveyor belts, and any scripted area where the anticheat would otherwise detect elevated speed or unexpected position changes.

***

## RegisterMovementZone

Register a Workspace part or model as a movement zone.

### Signature

```lua theme={null}
Trace.RegisterMovementZone(partOrModel, options) -> zoneId?, error?
```

### Parameters

<ParamField path="partOrModel" type="BasePart | Model" required>
  The part or model in Workspace that defines the zone boundary. Zone detection uses the oriented
  bounding box of the instance, so rotated parts and models work correctly without any extra
  configuration. For `Model` instances, Trace uses the complete model bounding box.
</ParamField>

<ParamField path="options" type="table" required>
  Configuration for the zone. All fields within the table are optional.

  <ParamField path="options.Id" type="string?">
    A stable identifier for the zone. Use this to reference the zone later with
    `SetMovementZoneEnabled`, `UnregisterMovementZone`, or other management calls. If omitted,
    Trace generates a unique ID automatically and returns it.
  </ParamField>

  <ParamField path="options.Reason" type="string?">
    A human-readable description of the zone. Written to Trace's moderation logs.
  </ParamField>

  <ParamField path="options.Checks" type="{string}?">
    The anticheat checks to suspend for players inside the zone. Valid values are `"Teleport"`,
    `"Velocity"`, `"Fling"`, `"Fly"`, and `"Noclip"`. Omit to suspend all five checks.
  </ParamField>

  <ParamField path="options.GraceAfterExit" type="number?">
    Seconds to keep exceptions active after a player leaves the zone boundary. Use this for launch
    pads or any zone where the movement effect (an upward velocity, for example) continues after
    the player is physically outside the area.
  </ParamField>

  <ParamField path="options.Padding" type="number?">
    Studs to expand every side of the zone bounding box. Useful when the visible part is slightly
    smaller than the area you want to protect, or to give players a small buffer near the edges.
  </ParamField>
</ParamField>

### Returns

<ResponseField name="zoneId" type="string?">
  The identifier for the registered zone - either the `Id` you provided or a generated one. Store
  this value if you need to manage the zone later. Returns `nil` on failure.
</ResponseField>

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

### Example

```lua theme={null}
local zoneId = Trace.RegisterMovementZone(workspace.LaunchPad, {
    Id = "launch-pad",
    Reason = "Launch pad area",
    Checks = {"Velocity", "Fling", "Fly"},
    GraceAfterExit = 2,
    Padding = 3,
})
```

<Tip>
  Always set `GraceAfterExit` for launch pads or any zone that applies an impulse to the player.
  Without a grace period, Trace may flag the player's trajectory the instant they leave the zone
  boundary - before the impulse has finished carrying them.
</Tip>

<Note>
  If the registered part or model is destroyed or removed from Workspace, Trace automatically
  unregisters the zone. You do not need to call `UnregisterMovementZone` in a `Destroying`
  connection, though doing so is harmless.
</Note>

***

## Zone management functions

### SetMovementZoneEnabled

Temporarily disable or re-enable a zone without unregistering it. Disabled zones do not grant
exceptions to players inside them.

#### Signature

```lua theme={null}
Trace.SetMovementZoneEnabled(zoneIdOrInstance, enabled) -> boolean
```

#### Parameters

<ParamField path="zoneIdOrInstance" type="string | BasePart | Model" required>
  The zone to target. Pass the `zoneId` string returned by `RegisterMovementZone`, or the
  original `BasePart` or `Model` instance used when the zone was registered.
</ParamField>

<ParamField path="enabled" type="boolean" required>
  `true` to enable the zone; `false` to disable it.
</ParamField>

#### Returns

<ResponseField name="success" type="boolean">
  `true` if the zone was found and its state updated successfully.
</ResponseField>

#### Example

```lua theme={null}
Trace.SetMovementZoneEnabled(zoneId, false)  -- disable during downtime
Trace.SetMovementZoneEnabled(zoneId, true)   -- re-enable when ready
```

***

### UnregisterMovementZone

Permanently remove a zone. Players currently inside the zone immediately lose their zone-based
exceptions.

#### Signature

```lua theme={null}
Trace.UnregisterMovementZone(zoneIdOrInstance) -> boolean
```

#### Parameters

<ParamField path="zoneIdOrInstance" type="string | BasePart | Model" required>
  The zone to remove. Pass the `zoneId` string returned by `RegisterMovementZone`, or the
  original `BasePart` or `Model` instance used when the zone was registered.
</ParamField>

#### Returns

<ResponseField name="success" type="boolean">
  `true` if the zone was found and successfully removed.
</ResponseField>

#### Example

```lua theme={null}
Trace.UnregisterMovementZone(zoneId)
```

***

### GetMovementZones

Return a list of summaries for all currently registered zones. Useful for debugging or building
admin tooling.

#### Signature

```lua theme={null}
Trace.GetMovementZones() -> zone summaries
```

#### Returns

<ResponseField name="zones" type="{table}">
  An array of zone summary tables, one entry per registered zone. Each summary includes at
  minimum the zone's `Id` and `Enabled` state.
</ResponseField>

#### Example

```lua theme={null}
local zones = Trace.GetMovementZones()
for _, zone in zones do
    print(zone.Id, zone.Enabled)
end
```
