Possible to get Maximum allowed players in a Place?

I am trying to get this value via Server Script

Is this possible? I can’t seem to find any resources for it. If not, how do I approach this problem? I cannot hardcode it because I am going to duplicate the places but will change its behavior depending on how many maximum players it allows

1 Like

You can manipulate Max Players allowed by using a server-side script.

game.MaxPlayers = 16

If you need to find Max Players value you can use

local maxPlayers = game.MaxPlayers
print("Server max players is ", maxPlayers)

This is incorrect. MaxPlayers is a property of the Players service. Additionally, the property is ReadOnly — meaning you can’t modify its value.

1 Like

My apologizes. Looks like there is no way to change MaxPlayers property.

Any updates on how to do this? Is something as simple as this really impossible?

The Players service has a property called MaxPlayers. (game.Players.MaxPlayers)
You can use that property to get the maximum number of players allowed in a server.
Though it’s read-only.

1 Like

Why is it that, when I have set my max players to 3 it always says 60?

Edit:
Tested it on the actual thing, it does say 3 this is correct!

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.