So I need a player counter that counts the players. I couldn't find a result online or in ROBLOX wiki.
What I'm trying to do is when a player joins a game it will keep looping an intro until another player joins.
But I can't use PlayerAdded so I need to a player counter. I know this is a script request (kinda) but I have no clue where to find any results other than here. I have looked everywhere necessary but now I will need the assistance of the fellow members on Scripting Helpers.
Thank you for any feed back or links to the feature I'm looking for.
You could just get all the children in Players, like abnotaddable did like so.
print(#game.Players:GetChildren())
What this does, is gets the children under the Player service. Then, it counts how many children are in the table, then it gets printed. Hope this helps!
You could use PlayerAdded and add one to a value, but this is inefficient with the introduction of tables and things.
local PlayerCount = game:GetService("Players"):GetPlayers() print(#PlayerCount)