API:Class/TeleportService/TeleportToPrivateServer

TeleportToPrivateServer

Function of ExplorerImageIndex70.pngTeleportService
void TeleportToPrivateServer (
    int placeId,
    string reservedServerAccessCode,
    array<Player> players,
    string spawnName = "",
    Variant teleportData,
    ScreenGui customLoadingScreen = nil
)
Parameters:
  1. placeId
    • Type: int
    • Required
  2. reservedServerAccessCode
  3. players
  4. spawnName
  5. teleportData
  6. customLoadingScreen

Returns: void
Description: Used to teleport one or more players to a reserved server. reservedServerAccessCode can be created using ReserveServer The given teleportData can be any value that can be stored in a datastore, and will be transported along with each player. The customLoadingScreen is a GUI that'll be made static (scripts don't run, TweenPosition etc doesn't work, ...) and displayed during teleporting. You can see these arguments after each player has been teleported, using LocalPlayerArrivedFromTeleport.

Example

See ReserveServer for examples