https://www.roblox.com/games/1320186298/Island-Royale-BETA
Wondering what method you would use to create a server and teleport a bunch of players to it then lock it so no-one else can join. Kind of what Apocalypse Rising 1 lobby does. Can someone give me the run down on the methods you would use along with the Roblox Universe functionality?
This is done using the :ReserveServer()
method and :TeleportToPrivateServer()
method of TeleportService
. Below is an example code that would teleport a player to a private server when they click a specific part.
local tps = game:GetService("TeleportService") function Teleport(plr) local accessCode = tps:ReserveServer() tps:TeleportToPrivateServer(game.PlaceId, accessCode, {plr}) end ClickDetector.MouseClick:Connect(Teleport)
Wiki Pages to look into:
TeleportService
:ReserveServer()
:TeleportToPrivateServer()
If my answer solved your problem, please remember to mark it as correct