i don't really know what to put here
It teleports a group of players to the same server of a given place and returns a number representing the server they were teleported to.
The purpose of this method is to be able to teleport friends that want to stay together to a different place.
Here is an example of usage:
local TeleportService = game:GetService("TeleportService") -- this will be the list of players to teleport together local party = {} -- for the sake of this example, I'm just going to add anyone who joins -- the server to the party game.Players.PlayerAdded:Connect(function(player) -- guests cannot be teleported, so I won't add guests to the party -- you can identify guests from their negative user ID if player.UserID < 0 then table.insert(party, player) end -- end) -- [...] -- later in your code, you can invoke `TeleportPartAsync` like so local guid = TeleportService:TeleportPartyAsync ( 78126313 -- this is the place ID to teleport the party to party, -- here you can add any data to pass to the receiving server. I'll leave this `nil` nil, -- here you can a ScreenGui to use as a loading screen, I'll leave this `nil` also nil ) print("Teleported all players to server " .. guid)
Note that the last two arguments are completely optional, you don't need to supply anything, not even nil
. I'm just passing nil
for the sake of this example.
You could very well call TeleportPartyAsync
like so:
TeleportService:TeleportPartyAsync(78126313, party)