Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 5 years ago

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

Log in to vote
0
Answered by
DanzLua 2879 Moderation Voter Community Moderator
5 years ago

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
0
How Can I Make my Game only joinable by going to the lobby and other player cant go in? thanks Minecrafter09031031 16 — 5y
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. DanzLua 2879 — 5y
0
@Minecrafter09031031 Make sure you accept the answer if it helped you. DanzLua 2879 — 5y
Ad

Answer this question