Reproduction Steps
This issue currently occurs for Project Frontlines Testing - Roblox. It occurred for one other place pertaining to the same project (although not in the same universe) roughly one year ago. I addressed it with I workaround which I’ve been using until recently.
Expected Behavior
The max player count of the place in question is set to 20. I expect to see 20 in the properties tab for MaxPlayers, PreferredPlayers. I expect to get a value of 20 whenever I write game.Players.MaxPlayers.
Actual Behavior
In edit mode, the studio properties tab shows values of 60 for MaxPlayers and PreferredPlayers. In game, server scripts get a value of 60 when they asks for Players.MaxPlayers upon initialization. If I use the developer console in the same server and write print(game.Players.MaxPlayers), I get the correct value of 20.
Workaround
Defining my own max player count constant.
Issue Area: Engine Issue Type: Other Impact: Moderate Frequency: Constantly Date First Experienced: 2020-12-01 00:12:00 (-08:00) Date Last Experienced: 2021-12-23 00:12:00 (-08:00)
Cleaning up some old threads here, we’ve noted the feedback but this is something that we can’t easily change due to the nature of Team Create. With Team Create the RCC server the game is running on has a player limit itself that is unrelated to your game, and that is the limit that is showing up when queried.
The workaround for now is to use a separate variable like the OP mentioned, you can also add a check on real game server starts to display a warning if that variable ever mismatches the real maxPlayers.