Rapster2
|
  |
| Joined: 16 Oct 2009 |
| Total Posts: 1865 |
|
|
| 24 Jan 2014 07:09 PM |
| How would I find out the number of Players in a game? |
|
|
| Report Abuse |
|
|
| |
|
Astrain1
|
  |
| Joined: 27 Mar 2013 |
| Total Posts: 18697 |
|
|
| 24 Jan 2014 07:11 PM |
Try this:
playerCount = 0
for i,v in pairs(game.Players:GetChildren()) do playerCount = playerCount + 1 end
print(playerCount)
~ You have 1 new message: Pancake. ~ |
|
|
| Report Abuse |
|
|
|
| 24 Jan 2014 07:12 PM |
Game['Players']['NumPlayers']
or
#Game:GetService('Players'):GetPlayers() |
|
|
| Report Abuse |
|
|
Goulstem
|
  |
| Joined: 04 Jul 2012 |
| Total Posts: 7177 |
|
|
| 24 Jan 2014 07:12 PM |
plrs = {game.Players:GetChildren()} m = Instance.new("Message", game.Workspace)
for i,v in pairs(plrs) do m.Text = "There are " return v.Value .. " players in the server" end |
|
|
| Report Abuse |
|
|
| |
|