queue_on_teleport Synchronous
queue_on_tpqueueonteleportqueueontpqueueteleportsyn.queue_on_teleport
Queue a Luau source string to run after the next eligible game teleport. Use it for a small piece of setup that should follow the player into the new session.
Luau
queue_on_teleport(source: string) -> ()Parameters
| Parameter | Type | Description |
|---|---|---|
source | string | Luau source to run after teleport. |
Returns
()No values.
Usage notes
Requires an active game session and current authorization. Queuing does not run the source immediately.
Call clear_teleport_queue to discard entries you no longer want executed.
Example
Luau
queue_on_teleport([[print("Arrived in the new game session")]])
print("Teleport setup queued")