Lets suppose we are at Place1 and then we teleport all the player at Place2. Now, is there a way to teleport all the players in 1 server, like ALL of them?
Is it possible to teleport all the players in one server?
2 answers
You can use TeleportService:TeleportPartyAsync() to teleport multiple players at once to an other place, by passing the table of players as the second argument, rather than just a single one.
game:GetService("TeleportService"):TeleportPartyAsync(1818, game:GetService("Players"):GetPlayers())
Keep in mind that place must be a part of the current game.
If you want to teleport all players to a place which isn't a part of your game, you should probably iterate all players and use TeleportService:Teleport() on them separately.
for i,v in pairs(game:GetService("Players"):GetPlayers()) do
game:GetService("TeleportService"):Teleport(1818, v)
end
Yes, there is a way to do it using TeleportToPrivateServer and ReserveServer functions of TeleportService.
I'm not sure if that's really what you need but try it, I think it will be good for what you need since TeleportToPrivate server takes an array of players to teleport.
This discussion is preserved as it was. New answers, comments, and votes are closed.
