Stop players from joining a server?

I have a lobby, and the lobby teleports players using a simple
game:GetService(‘TeleportService’):Teleport(gameId, player)

This sticks them in a new game if the existing servers are full, pairs up friends, and is generally exactly what I want.


After a couple of minutes, I don’t want any more players joining even if the server isn’t full, because the game is under way.

Is there a graceful way to do this?

I really don’t want to have to write and manage a big complex matchmaking system strung together out of reserved servers and sticky tape…


Just teleport them to a reserved server instead. This allows you to control who joins the server.

If you want to use Roblox’s default matchmaking system there’s not much you can do to prevent joining. You could try to teleport them again(to the same game) but it’s not unlikely they’ll join another server that they’re not allowed to


Do the current options for determining player filling sizes on the configuration menu not already help you? In this case, like above said, you can just make your own server system with reserved servers. Teleport normally to access public servers and use private servers for closed matches.

1 Like

I’d say from the menu, dump them into a “game server” place which is just the start for matches. Require the game server place to wait until x number of players, and then dump those players into a reserveserver for the match. At the end of the match, dump them back to the lobby or “game server”

Using COD BO4 as an example:
This is the start place:

This is the game server:

This is the match:


Thanks for the info :slight_smile:

The current public server system is nearly perfect for my needs except being able to close the server after a given point (it’d be a bad experience to join an ongoing game for new players).

The interface for my game is super casual. There is a hole in the ground in the lobby, and you jump in to play.

I’d really rather keep any options or menus or text away from players until they have had QuickStart games a few times.

So, new problems then!

I can recreate the public system… and have… using a complex rig of reserved servers, friends lists, and communication over data stores. I have some concerns about how well this will scale but I think it will be manageable.

What I gain from this is the ability to control exactly who joins a game, so yay!

What I lose is one of robloxes better features, the ability to invite friends into your game and the ability to join a friend from the web interface.

If you are using reserved servers now the following two behaviours happen:

If you use [join] to join a friend who is in a reserved server, you join the lobby place instead.

If you use [invite] to ask a friend to join, the friend joins the lobby place instead.

This isn’t the end of the world, but it’d be nice to have that work for users :frowning:

My best plan for working around it is: search all the currently active reserved servers (unghhh slow refresh times ahoy) and find your friends, and give you a simple prompt on which friend to join once you QuickStart.

(AFAIK you can’t tell in any way that a player joined a lobby due to invites or join friend or which friend they wanted to join…)

Aannyway, having the ability to programmatically close a public server (let me change maxplayers to a lower value, let me set reserved slots to fill the remainder) would solve 99 percent of making a good experience for my game.

The only thing that would be an issue Then would be if you don’t want to play with your friends, and frankly that’s just not roblox :slight_smile:

1 Like