Skip to content

rbx.teleportQueue.add ​

Adds a script to the teleportQueue.

Signature ​

luau
function add(script: string, id: string?): string

Summary ​

Parameters ​

ParameterTypeDescription
scriptstringThe Luau source code to execute after teleport.
idstring?Optional user-defined identifier for this script.

Example ​

luau
local teleportQueue = require("@runtime/rbx/teleportQueue")

local id = teleportQueue.add([[
    print("Arrived at new place!")
]])