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

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

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

✓ Accepted answer

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

5 comments

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?

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.

0

I upvoted your answer, we need to make a rebellion against Incapaz :P

0

@NoirPhoenix Thanks for that lol. I totally agree, we can't have people abusing downvotes and spreading wrong information here.

0

Thanks a lot, this explains everything!

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