PcoWSkbVqDnWTu_dm2ix
We use cookies on this site to enhance your user experience
Collapse Sidebar

MaxPlayersInternal

Players

int

The MaxPlayersInternal Players property is the internal variant of Players/MaxPlayers and determines the maximum amount of players that can be in this server.

While this property cannot be set through Scripts or LocalScripts in-game, it can be set from the place settings’ Access tab on the site.

You can change this value depending on the number of player’s you would like to limit in a single server. The number of players in a server affects the feel of your game and it’s performance.


Code Samples


PreferredPlayers Example

The script below prints a table displaying the Players/MaxPlayers, Players/PreferredPlayers, and the number of players currently on the server.

Maximum Preferred Current
Maximum number of players allowed in the server Preferred number of players in the server Number of players currently in the server
print("========== Player Count ===========")
print("Maximum\t| Preffered\t| Current")
print(game.Players.MaxPlayers.."\t| "..game.Players.PreferredPlayers.."\t| "..#game.Players:GetChildren())
print("=================================")