Roblox Briefly Allows MaxPlayers + 1 When Players Are Connecting / Disconnecting

Reproduction Steps

1) Create place with server fill option set as “Roblox Optimized”
2) Print #game.Players:GetPlayers() on PlayeredAdded
3) Observe that you will sometimes get MaxPlayers + 1

Expected Behavior

I expect it to be a valid assumption that the maximum player count is strictly maintained.

Actual Behavior

Maximum player count is briefly broken. Not sure if it only holds on a single frame or across multiple.

Issue Area: Engine
Issue Type: Other
Impact: Low
Frequency: Sometimes

7 Likes

This is most likely allowed to let players to join once someone leaves, as there is a small window of time on players leaving where nobody can join,
So in this time, bump it up by 1, let someone in, boom, got someone new in right as someone left, getting well, optimized server

3 Likes

Is this why I sometimes see servers with 8/7 players inside? Refreshing the page doesn’t change the number.

1 Like

Not sure why that happens tbh, just some of that Roblox jank

1 Like

Yep, it’s a bug as old as time. It’s rare, and gets rarer every day, but it still happens and (assuming your code isn’t poorly made and has fallback conditions for when something goes wrong) usually doesn’t affect much.

2 Likes

Nobody wants to make sure that the server doesn’t have too many players. Roblox should be handling that perfectly fine.

If the game is similar to Lumber Tycoon 2, and Bee Swarm Simulator,
where each player can claim a plot of land, this will be a big issue.
The 7/6th player will not be able to play the game.

Lumber tycoon have 7 or 8 plots, while there’s 6 players limit. So, for now I think we need just add small check which will kick player if there’s limit reached.

Those plots are seemingly reserved for it’s unique way of loading and unloading slots. If this bug was more common, and proven to be real, that’d be a big issue even for LT2.

Anyways, has anyone ever been in a server with max players + 1? Or is it simply a web visual error?

This happens when the server is full and you rejoin while someone else is trying to join, the result is you and the other player joining successfully and exceeding the limit. I don’t think this should be considered as a bug as some people use it to let their friends in (i.e script builders) when a server is full.

This should absolutely be considered a bug - this has a big impact in team sports genre, like for example soccer, where even 1 extra player on the other team heavily tilts the balance of the game in favor of the other team.

I personally haven’t been in a server where the player count exceeds max players, but we’ve had multiple reports from our community of it happening with screenshots.

This can be fixed with a simple check though? Just check on PlayerAdded if the player amount is over MaxPlayers, if so, teleport them to a different server.

Regardless of how easy it is to work around, it is still a bug… Many people are probably not aware of this bug, and therefore wouldn’t even implement a check for this case.

Thanks for the report. A ticket has been filed to our internal database.

1 Like

Hi,
Thanks a lot for reporting this issue. The team is aware of this problem, which happens in rare edge case situations. We have plans on building a new system which should solve the issue in the future.
Thanks!

4 Likes