I have some code to find out the max number of players. It says An error occurred
on line 4. Do I have to specify the max number of players or can the server do that?
while true do wait() numplayers = game.Players.NumPlayers maxplayers = game.Players.MaxPlayers script.Parent.Text = "Players in game: " ..numplayers.. " of " ..maxplayers end
Max player's is not a property in players so just make a player limit in Configure and let's 12 people is the limit
while true do wait() numplayers = game.Players.NumPlayers maxplayers = 12 script.Parent.Text = "Players in game: " ..numplayers.. " of " ..maxplayers end
You can probably print it.
print(game.Players.NumPlayers)
@Hex's answer, I knew it!