Learn
Engine Class
TeleportService
Not Creatable
Service

Summary
Properties
Methods
GetTeleportSetting(setting: string):Variant
ReserveServer(placeId: number):Tuple
Deprecated
SetTeleportSetting(setting: string,value: Variant):()
Teleport(placeId: number,player: Instance,teleportData: Variant,customLoadingScreen: Instance):()
TeleportAsync(placeId: number,players: Instances,teleportOptions: Instance):Instance
TeleportPartyAsync(placeId: number,players: Instances,teleportData: Variant,customLoadingScreen: Instance):string
TeleportToPlaceInstance(placeId: number,instanceId: string,player: Instance,spawnName: string,teleportData: Variant,customLoadingScreen: Instance):()
TeleportToPrivateServer(placeId: number,reservedServerAccessCode: string,players: Instances,spawnName: string,teleportData: Variant,customLoadingScreen: Instance):()
TeleportToSpawnByName(placeId: number,spawnName: string,player: Instance,teleportData: Variant,customLoadingScreen: Instance):()
Events
TeleportInitFailed(player: Instance,teleportResult: Enum.TeleportResult,errorMessage: string,placeId: number,teleportOptions: Instance):RBXScriptSignal
Inherited Members

API Reference
Properties
CustomizedTeleportUI
Deprecated

Methods
GetArrivingTeleportGui
Capabilities: UI, Teleport
TeleportService:GetArrivingTeleportGui():Instance
Returns
Code Samples
Handling a Teleport Loading GUI
local TeleportService = game:GetService("TeleportService")
local Players = game:GetService("Players")
local ReplicatedFirst = game:GetService("ReplicatedFirst")
local customLoadingScreen = TeleportService:GetArrivingTeleportGui()
if customLoadingScreen then
local playerGui = Players.LocalPlayer:WaitForChild("PlayerGui")
ReplicatedFirst:RemoveDefaultLoadingScreen()
customLoadingScreen.Parent = playerGui
task.wait(5)
customLoadingScreen:Destroy()
end

GetLocalPlayerTeleportData
Capabilities: Teleport
TeleportService:GetLocalPlayerTeleportData():Variant
Returns
Variant
Code Samples
Getting LocalPlayer Teleport Data
local TeleportService = game:GetService("TeleportService")
local teleportData = TeleportService:GetLocalPlayerTeleportData()
print("Local player arrived with this data:", teleportData)

GetPlayerPlaceInstanceAsync
Yields
Capabilities: Teleport
TeleportService:GetPlayerPlaceInstanceAsync(userId:User):Tuple
Parameters
userId:User
Returns
Code Samples
Following Another Player
local TeleportService = game:GetService("TeleportService")
local Players = game:GetService("Players")
Players.PlayerAdded:Connect(function(player)
local followId = player.FollowUserId
if followId and followId ~= 0 then
-- Is this player following anyone? If so, find out where they are
local success, currentInstance, error, placeId, jobIdOrErr = pcall(function()
return TeleportService:GetPlayerPlaceInstanceAsync(followId)
end)
-- followId is the user ID of the player that you want to retrieve the place and job ID for
if success then
-- Teleports player on success based off jobId
TeleportService:TeleportToPlaceInstance(placeId, jobIdOrErr, player)
else
-- Posts a warning based off returning error
warn(jobIdOrErr)
end
else
warn(("Player %d is not following another player!"):format(player.UserId))
end
end)

GetTeleportSetting
Capabilities: Teleport
TeleportService:GetTeleportSetting(setting:string):Variant
Parameters
setting:string
Returns
Variant

PromptExperienceDetailsAsync
Yields
Capabilities: Teleport
TeleportService:PromptExperienceDetailsAsync(
player:Player, universeId:number
Parameters
player:Player
universeId:number
Code Samples
Show Experience Details to Player
local TeleportService = game:GetService("TeleportService")
local Players = game:GetService("Players")
local player = Players.LocalPlayer
local success, result = pcall(function()
TeleportService:PromptExperienceDetailsAsync(player, 8357232245)
end)
if not success then
warn("Error prompting experience details: " .. tostring(result))
end
if result == Enum.PromptExperienceDetailsResult.PromptClosed then
print("Player closed the experience details prompt")
elseif result == Enum.PromptExperienceDetailsResult.TeleportAttempted then
print("Player chose to teleport to the experience")
end

ReserveServer
Deprecated

ReserveServerAsync
Yields
Capabilities: Teleport
TeleportService:ReserveServerAsync(placeId:number):Tuple
Parameters
placeId:number
Returns
Code Samples
TeleportService: Teleport to a Reserved Server
local TeleportService = game:GetService("TeleportService")
local Players = game:GetService("Players")
local code = TeleportService:ReserveServerAsync(game.PlaceId)
local players = Players:GetPlayers()
TeleportService:TeleportToPrivateServer(game.PlaceId, code, players)
-- You could add extra arguments to this function: spawnName, teleportData and customLoadingScreen
TeleportService: Teleport to a Reserved Server via Chat
local TeleportService = game:GetService("TeleportService")
local Players = game:GetService("Players")
local DataStoreService = game:GetService("DataStoreService")
local dataStore = DataStoreService:GetGlobalDataStore()
-- Get the saved code
local code = dataStore:GetAsync("ReservedServer")
if typeof(code) ~= "string" then -- None saved, create one
code = TeleportService:ReserveServerAsync(game.PlaceId)
dataStore:SetAsync("ReservedServer", code)
end
local function joined(player)
player.Chatted:Connect(function(message)
if message == "reserved" then
TeleportService:TeleportToPrivateServer(game.PlaceId, code, { player })
end
end)
end
Players.PlayerAdded:Connect(joined)

SetTeleportGui
Capabilities: UI, Teleport
TeleportService:SetTeleportGui(gui:Instance):()
Parameters
Returns
()
Code Samples
Teleporting the local player
local TeleportService = game:GetService("TeleportService")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Players = game:GetService("Players")
local playerGui = Players.LocalPlayer:WaitForChild("PlayerGui")
local PLACE_ID = 0 -- replace here
local loadingGui = ReplicatedStorage:FindFirstChild("LoadingGui")
-- parent the loading gui for this place
loadingGui.Parent = playerGui
-- set the loading gui for the destination place
TeleportService:SetTeleportGui(loadingGui)
TeleportService:Teleport(PLACE_ID)

SetTeleportSetting
Capabilities: Teleport
TeleportService:SetTeleportSetting(
setting:string, value:Variant
):()
Parameters
setting:string
value:Variant
Returns
()

Teleport
Capabilities: UI, Teleport
TeleportService:Teleport(
placeId:number, player:Instance, teleportData:Variant, customLoadingScreen:Instance
):()
Parameters
placeId:number
player:Instance
Default Value: "nil"
teleportData:Variant
customLoadingScreen:Instance
Default Value: "nil"
Returns
()
Code Samples
Teleporting the local player
local TeleportService = game:GetService("TeleportService")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Players = game:GetService("Players")
local playerGui = Players.LocalPlayer:WaitForChild("PlayerGui")
local PLACE_ID = 0 -- replace here
local loadingGui = ReplicatedStorage:FindFirstChild("LoadingGui")
-- parent the loading gui for this place
loadingGui.Parent = playerGui
-- set the loading gui for the destination place
TeleportService:SetTeleportGui(loadingGui)
TeleportService:Teleport(PLACE_ID)
Teleporting from the server
local Players = game:GetService("Players")
local TeleportService = game:GetService("TeleportService")
local PLACE_ID = 0 -- replace here
local USER_ID = 1 -- replace with player's UserId
local player = Players:GetPlayerByUserId(USER_ID)
TeleportService:Teleport(PLACE_ID, player)

TeleportAsync
Yields
Capabilities: UI, Teleport
TeleportService:TeleportAsync(
placeId:number, players:Instances, teleportOptions:Instance
Parameters
placeId:number
players:Instances
teleportOptions:Instance
Default Value: "nil"
Returns

TeleportPartyAsync
Yields
Capabilities: UI, Teleport
TeleportService:TeleportPartyAsync(
placeId:number, players:Instances, teleportData:Variant, customLoadingScreen:Instance
Parameters
placeId:number
players:Instances
teleportData:Variant
customLoadingScreen:Instance
Default Value: "nil"
Returns
Code Samples
Teleport all players in the server
local Players = game:GetService("Players")
local TeleportService = game:GetService("TeleportService")
local PLACE_ID = 0 -- replace
local playerList = Players:GetPlayers()
local success, result = pcall(function()
return TeleportService:TeleportPartyAsync(PLACE_ID, playerList)
end)
if success then
local jobId = result
print("Players teleported to", jobId)
else
warn(result)
end

TeleportToPlaceInstance
Capabilities: UI, Teleport
TeleportService:TeleportToPlaceInstance(
placeId:number, instanceId:string, player:Instance, spawnName:string, teleportData:Variant, customLoadingScreen:Instance
):()
Parameters
placeId:number
instanceId:string
player:Instance
Default Value: "nil"
spawnName:string
teleportData:Variant
customLoadingScreen:Instance
Default Value: "nil"
Returns
()
Code Samples
Following Another Player
local TeleportService = game:GetService("TeleportService")
local Players = game:GetService("Players")
Players.PlayerAdded:Connect(function(player)
local followId = player.FollowUserId
if followId and followId ~= 0 then
-- Is this player following anyone? If so, find out where they are
local success, currentInstance, error, placeId, jobIdOrErr = pcall(function()
return TeleportService:GetPlayerPlaceInstanceAsync(followId)
end)
-- followId is the user ID of the player that you want to retrieve the place and job ID for
if success then
-- Teleports player on success based off jobId
TeleportService:TeleportToPlaceInstance(placeId, jobIdOrErr, player)
else
-- Posts a warning based off returning error
warn(jobIdOrErr)
end
else
warn(("Player %d is not following another player!"):format(player.UserId))
end
end)

TeleportToPrivateServer
Capabilities: UI, Teleport
TeleportService:TeleportToPrivateServer(
placeId:number, reservedServerAccessCode:string, players:Instances, spawnName:string, teleportData:Variant, customLoadingScreen:Instance
):()
Parameters
placeId:number
reservedServerAccessCode:string
players:Instances
spawnName:string
teleportData:Variant
customLoadingScreen:Instance
Default Value: "nil"
Returns
()
Code Samples
TeleportService: Teleport to a Reserved Server via Chat
local TeleportService = game:GetService("TeleportService")
local Players = game:GetService("Players")
local DataStoreService = game:GetService("DataStoreService")
local dataStore = DataStoreService:GetGlobalDataStore()
-- Get the saved code
local code = dataStore:GetAsync("ReservedServer")
if typeof(code) ~= "string" then -- None saved, create one
code = TeleportService:ReserveServerAsync(game.PlaceId)
dataStore:SetAsync("ReservedServer", code)
end
local function joined(player)
player.Chatted:Connect(function(message)
if message == "reserved" then
TeleportService:TeleportToPrivateServer(game.PlaceId, code, { player })
end
end)
end
Players.PlayerAdded:Connect(joined)
TeleportService: Teleport to a Reserved Server
local TeleportService = game:GetService("TeleportService")
local Players = game:GetService("Players")
local code = TeleportService:ReserveServerAsync(game.PlaceId)
local players = Players:GetPlayers()
TeleportService:TeleportToPrivateServer(game.PlaceId, code, players)
-- You could add extra arguments to this function: spawnName, teleportData and customLoadingScreen

TeleportToSpawnByName
Capabilities: UI, Teleport
TeleportService:TeleportToSpawnByName(
placeId:number, spawnName:string, player:Instance, teleportData:Variant, customLoadingScreen:Instance
):()
Parameters
placeId:number
spawnName:string
player:Instance
Default Value: "nil"
teleportData:Variant
customLoadingScreen:Instance
Default Value: "nil"
Returns
()
Code Samples
TeleportService:TeleportToSpawnByName
local TeleportService = game:GetService("TeleportService")
TeleportService:TeleportToSpawnByName(1818, "TeleportSpawn")

Events
LocalPlayerArrivedFromTeleport
Capabilities: Teleport
TeleportService.LocalPlayerArrivedFromTeleport(
loadingGui:Instance, dataTable:Variant
Parameters
loadingGui:Instance
dataTable:Variant

TeleportInitFailed
Capabilities: Teleport
TeleportService.TeleportInitFailed(
player:Instance, teleportResult:Enum.TeleportResult, errorMessage:string, placeId:number, teleportOptions:Instance
Parameters
player:Instance
teleportResult:Enum.TeleportResult
errorMessage:string
placeId:number
teleportOptions:Instance

©2026 Roblox Corporation. Roblox, the Roblox logo and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.