This function teleports one or more
Player|Players to a reserved server created using
The reservedServerAccessCode parameter is the access code returned by
TeleportToPrivateServer can only be called on the server.
An optional spawnName parameter can be provided, which will cause the
Player|Players to initially spawn at the
SpawnLocation of that name in the destination place. The
SpawnLocation must be valid for the
Player|Players to spawn on. For example, it must be
SpawnLocation/Neutral|neutral or set to the same
SpawnLocation/TeamColor|TeamColor as the
Player|Players will be assigned to upon joining the game.
A teleportData parameter can be specified. This is data the clients will transmit to the destination place and can be retrieved using
The teleportData can take any of the following forms:
- A table without mixed keys (all keys are strings or integers)
- A string
- A number
- A bool
As the teleportData is transmitted by the client it is not secure. For this reason it should only be used for local settings and not sensitive items (such as the users’ score or in-game currency).
If you need teleport data to persist across multiple teleports, you can use
A customLoadingScreen argument can be specified. This is a
ScreenGui that is copied (without scripts) into the
CoreGui of the destination place.
You are advised to instead set the loading screen on the client using
TeleportService/SetTeleportGui. The loading
ScreenGui should also be parented to the
PlayerGui a few seconds before the teleport to ensure a smooth transition using a
RemoteEvent. For an example of this see
ScreenGui can be obtained in the destination place using
TeleportService/GetArrivingTeleportGui, where developers can parent it to the
In some circumstances a teleport may fail. This can be due to the developer configuring the teleport incorrectly or issues with Roblox’s servers.
- If a teleportation request is rejected the
TeleportService/TeleportInitFailedevent will fire the error message and a
Enum/TeleportResultenumerator describing the issue
- Teleports can fail ‘in transit’, after the user has left the server, due to issues with Roblox’s servers. In this case the user will be shown an error message and be required to rejoin the game
This service does not work during playtesting in Roblox Studio — To test aspects of your game using it, you must publish the game and play it in the Roblox application.
For more information on how to teleport players, see the
Articles/Teleporting Between Places tutorial.
The ID of the place to teleport to
The reserved server access code returned by
An array of
Optional name of the
Optional data to be passed to the destination place. Can be retrieved using
Optional custom loading screen to be placed in the
TeleportService: Teleport to a Reserved Server via Chat
The following code would reserve one server, if it hasn’t be reserved before. Whenever someone says “reserved”, they will be teleported to the private server.
TeleportService: Teleport to a Reserved Server
The following code would send everyone in the current game to a reserved server. Since reserved servers can only be joined by using
/TeleportService/TeleportToPrivateServer, nobody will join the reserved server afterwards.
Mind that, since everyone will be teleported, the current server will (probably) shutdown as nobody would be left in it.