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

Make a server not available to join using script?

So basically I'm trying to make a battle royale game. If the game starts, I want to prevent new players from joining this server using a script.

I have tried to look for this and haven't found a good answer.

Thanks!

5 comments

0

Probably the best solutions is universes but I'm not sure

0

Not sure you know what they are... I don't think you even understand my question...

0

i think u have to ask roblox for that code, this is a server code not a game code roblox stands for server codes

0

Yes, I understand. With universes you can control the flow of players. I do not believe their is any way of shutting down a server in a script besides kicking every new player but that would keep players from reaching the lobby, while with universes you could control the flow.

1

A Universe is part of what you need. You'll have a place for the lobby and a place for the actual game. They'll be connected via universe and then you'll need to use ReserveServers

1 answer

✓ Accepted answer

You'll want to have a lobby, which when reaches the amount of players you want or the countdown finishes you'll create a Reserved Serve which all the players will be teleported to.

A player can only join a Reserve Server if you do it via code, so you don't have to worry about players randomly joining your game in progress.

Here's a link to the Roblox Wiki page: https://developer.roblox.com/api-reference/function/TeleportService/ReserveServer

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