Queue code to run after the next teleport (sUNC queueonteleport)
queue-on-teleportQueues a Luau code chunk to execute automatically after the next Roblox teleport, so scripts survive place changes and run in the destination.
Instructions
WRITES EXECUTOR STATE — queues a chunk of Luau source via queueonteleport(code) so it runs automatically after the NEXT teleport completes, in the destination place. This is how scripts survive a Roblox teleport: the queued code persists across the place change and executes once the new place loads. Requires queueonteleport. The call is type-guarded and pcall-wrapped: if queueonteleport is missing you get { error = 'queueonteleport is not available in this executor.' }. Returns { queued } or { error }. Signature: { code: string, threadContext: number?, timeoutMs: number? }. Phase: act; cost=medium; idempotency=contextual-write. Requires: active-client, explicit-mutation-approval, validated-source. Produces: structured-result. Verify with: assert-state. Safety: MUTATING; writes live game/client state. On failure: inspect tool-schema for exact fields, defaults, constraints, and an invocation example.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | The Luau source to run automatically after the next teleport. | |
| timeoutMs | No | Optional per-call deadline in milliseconds; omit it to use the tool or server default. | |
| threadContext | No | Optional Roblox thread identity for this call; omit it to use the server default. |