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

How does "Island Royale" teleport players into a new & locked game server?

Asked by
Sezess 12
6 years ago

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?

1 answer

Log in to vote
3
Answered by
oreoollie 649 Moderation Voter
6 years ago
Edited 6 years ago

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

0
Desperate man back at it again! 'mark it as correct' um answers can’t be wrong here. They can be accepted though. If another answer answers his question better, but this one solved it too, and he decided to mark the other one as "correct", how will yours get accepted? User#19524 175 — 6y
0
Please refrain from abusing the down vote system. Down votes are meant to indicate that an answer does not work or does not add to the solution at all, not to indicate that you dislike the poster. Thank you. oreoollie 649 — 6y
0
I upvoted your answer, we need to make a rebellion against Incapaz :P NoirPhoenix 148 — 6y
0
@NoirPhoenix Thanks for that lol. I totally agree, we can't have people abusing downvotes and spreading wrong information here. oreoollie 649 — 6y
0
Thanks a lot, this explains everything! Sezess 12 — 6y
Ad

Answer this question