Acessing the playercount

Hi there,

is there a way to access the player count in the bottom left corner? Id like to use it to build up a Visitor Statistic of a space.


I feel like Im getting close to it via getStats. It looks like that it can return “numPlayers”.

Entering “game/gameSpace.getStats” in the console returns a very big Code that I dont understand.
Any suggestions how I could call that command? Maybe somebody from the development site can give me a hint :slight_smile:

Another approach might be using game.Players, right? By counting the amount of individual player IDs


This should get you there:


thank you Bill !

entering “game.getStats(Object.keys(game.players).length)” returns something that contains the Player Count :-D, perfect. Excuse me the noobish question, but is there a way to concretized the command, so that it only returns numPlayers, nothing else?

I mean, the code alone I posted will get you the number of people in a space. The game.getStats is not needed.

you are right! Thank you again!