Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How to teleport a group of players?

Hello everyone!

How could I teleport a group of players to a unique place for them? something like tower battles

I ask this question since I have been very curious how this is done, I've already investigated but I'm not entirely sure, I would really appreciate if someone could help me a little with this

I await your answers!

1 answer

✓ Accepted answer

You can use teleportservice reserved servers

you could get a script that detects the players that want to teleport to the place, and put them into a table

with the table, you need to reserve a private server with this code :

local teleportService = game:GetService("TeleportService") -- gets teleport service
local players = game.Players:GetPlayers() -- get the players


local code = teleportService:ReserveServer(<place id here>) -- create a reserved code

Now, you need to teleport the players with this code :

local teleportService = game:GetService("TeleportService") -- gets teleport service
local players = game.Players:GetPlayers() -- get the players


local code = teleportService:ReserveServer(<place id here>) -- create a reserved code
teleportService:TeleportToPrivateServer(<place id here>,code,players) 
-- teleports the players inside the table to the reserved server

1 comment

0

Okey, thanks!

This discussion is preserved as it was. New answers, comments, and votes are closed.