Volt

queueonteleport

Queues a script to run after teleporting.

Syntax

queueonteleport(script: string) -> void

Aliases

  • queue_on_teleport
  • queueteleport

Parameters

ParameterTypeDescription
scriptstringThe Lua code to run after teleport

Returns

This function does not return a value.

Description

queueonteleport queues Lua code to be executed after the player teleports to another place. The script will run once the new place loads.

Example

-- Queue a script to run after teleporting
queueonteleport([[
    print("Teleported successfully!")
    -- Your script code here
]])

-- Teleport the player
game:GetService("TeleportService"):Teleport(placeId)

Auto-Execute Example

-- Queue the current script to run again
queueonteleport(game:HttpGet("https://example.com/script.lua"))

Notes

  • Only one script can be queued at a time
  • Use clearqueueonteleport to clear the queue
  • The script runs in a fresh environment

On this page