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!
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!
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.
5 comments
Probably the best solutions is universes but I'm not sure
Not sure you know what they are... I don't think you even understand my question...
i think u have to ask roblox for that code, this is a server code not a game code roblox stands for server codes
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.
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