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

How Do I Make A Group of Players Teleport To Another Game?

Just like in camping, How do you Teleport a Group of Player To Another game, And if they are in the game, no other player can join through, Please help, I really appreciate it

1 answer

✓ Accepted answer

Assuming you create a table with the players you want to teleport you can use ReservedServers to create a personal server for just this group of players.

local TS = game:GetService("TeleportService")
local Players = {}

--add players to Players using table.insert()
 
local code = TS:ReserveServer(game.PlaceId) -- Returns a code
local players = Players:GetPlayers() -- Get a list of all players
 
TS:TeleportToPrivateServer(game.PlaceId,code,players) -- Actually teleport the players
-- You could add extra arguments to this function: spawnName, teleportData and customLoadingScreen

3 comments

0

How Can I Make my Game only joinable by going to the lobby and other player cant go in? thanks

0

@Minecrafter09031031 Make the game a subplace of the main game. Click configure "Game" and on of the tabs should allow you to make a new place.

0

@Minecrafter09031031 Make sure you accept the answer if it helped you.

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