I’m creating a small project and it’s about teleporting a group of players. To specify I’m on my way to create a lobby system with GUIS. The creator of the lobby can start the game and teleport the players to the actual game and here comes the question. Does this line of command “tpServ:TeleportPartyAsync(placeId, getThePlrs(table of the players))” automatically start a new server or make the players join an already active server(if of course can handle the number of the new joined players).
Thanks for reading, I’m looking forward to your assistance
local TeleportService = game:GetService("TeleportService")
local PlaceId = 00000 --The id of the place
local PlayerTable = {"Player1", "Player2", "Player3"} --Players
TeleportService:TeleportAsync(PlaceId, PlayerTable) --Teleport players
Yeah I understand how to use the function, I think you misunderstood. I’m asking whether this function can start a new server or can make the players join an already active server or do either of them
If i understand you want to know if the function will make players join in a private server or in a active server. If you want to make them teleport to a private server where only them has access use TeleportOptions
Teleport to a private sever :
local TeleportService = game:GetService("TeleportService")
local PlaceId = 0000
local PlayerTable = {"Player1", "Player2", "Player3"}
local server = TeleportService:ReserveServer(PlaceId)
local TeleportOption = Instance.new("TeleportOptions")
TeleportOption.ReservedServerAccessCode = server
TeleportService:TeleportAsync(PlaceId, PlayerTable, TeleportOption)
Teleport to an active server
local TeleportService = game:GetService("TeleportService")
local PlaceId = 0000
local PlayerTable = {"Player1", "Player2", "Player3"}
TeleportService:TeleportAsync(PlaceId, PlayerTable)