Move a player to another part of a map or into an entirely different place with TeleportService.
Vehicles got your around a map under their own power. Teleporting skips the travel: one call and the is somewhere else — either a new zone in the same place, or a totally different place whose server loads them in.
The simplest teleport moves a from one zone to another in the same Place. Both ends live on the same server, so the just repositions:
local TeleportService = game:GetService("TeleportService")
local function teleportToZone(player, zoneCFrame)
local character = player.Character
if not character then return end
character:PivotTo(zoneCFrame)
end
Wait — this is just moving the character with PivotTo, the same trick from the checkpoints lesson. That works when the destination is on the same server. TeleportService only becomes necessary when you cross a server boundary — moving to a different Place.
A "zone" you want a to jump straight to is often just a . Reserve TeleportService for places that need a fresh server (different map, different game mode, a private server).
The service Roblox provides to move a player to another Place is called
When the destination is a different Place in the same experience, you call TeleportAsync with the Place ID (and optionally a game server ID):
local TeleportService = game:GetService("TeleportService")
local DESTINATION_PLACE_ID = 123456789 -- the other Place's ID
local function goToOtherPlace(player)
local success, err = TeleportService:TeleportAsync(DESTINATION_PLACE_ID, { player })
if not success then
warn("Teleport failed: " .. tostring(err))
end
end
TeleportAsync takes the target Place ID and a list of . The is disconnected from this server and loaded (usually within a few seconds) onto a server running the other place. Wrapping it in a -style success check means a missing or private Place ID doesn't crash your .
What does TeleportAsync actually do to the player?
Going back to the place you came from teleports you to the same Place, but likely a different server. That matters because your per-server state — , data you haven't saved, in-memory — may not carry over.
-- teleport back to the original game
local function goHome(player)
local homePlaceId = 123456780 -- the main Place
TeleportService:TeleportAsync(homePlaceId, { player })
end
Because teleporting to a Place can land you on any server of it, always save progress before teleporting (write or send it in the teleport data). Never assume memory on one server is visible on another.
Roblox reserves a small pool of servers per Place. Teleporting a large group at once can exceed it. Use TeleportAsync with the list and let Roblox handle server assignment, rather than manually spawning private servers unless you need them.
Teleport data lets the destination server know why the is arriving — which checkpoint, which zone, what loadout. Pass a JSON-able as TeleportData:
local TeleportService = game:GetService("TeleportService")
local function teleportWithData(player, zoneName, checkpointId)
local data = {
zone = zoneName,
checkpoint = checkpointId,
arrivedAt = os.time(),
}
TeleportService:TeleportAsync(DESTINATION_PLACE_ID, { player }, data)
end
The third argument to TeleportAsync is data the fountain server sends to the destination. It must be JSON-serializable — strings, numbers, booleans, , and nested . Don't put references, , or objects in it.
TeleportAsync takes a player list and optional teleport data. Write the call that teleports the single player to DESTINATION_PLACE_ID and carries a dictionary with a key 'level' set to 3.
-- send the player to the destination with some data
TeleportService:On the destination server, read the incoming 's joined data in PlayerAdded (or on the character being added):
game.Players.PlayerAdded:Connect(function(player)
local joinData = player:GetJoinData()
local teleportData = joinData.teleportData
if teleportData and teleportData.zone then
-- put them in the right zone / checkpoint
print("Arrived at zone:", teleportData.zone)
else
-- a brand-new player, not teleported — start them at spawn
end
end)
GetJoinData() returns a with teleport-related fields, including teleportData (what you sent). Use it to decide where to spawn the . If teleportData is nil, the joined normally and should go to the default spawn.
Teleport data is visible to the client too (it ships in JoinData), so don't put secrets or authoritative choices in it. Verify anything security-relevant on the destination server.
PivotTo the character — don't spin up a whole separate place.TeleportAsync returns an error. Always check the return.Next: ViewportFrames — a 3D preview of a model inside a GUI.