local count = 0
for _, player in pairs(game.Players:GetPlayers()) do
local boolvalue = player.PlayerGui:FindFirstChild("teamboolvalue")
if boolvalue and boolvalue:IsA("boolvalue") then
count = count + 1
end
end
return count
end
local teamcount = TeamCount()
print(teamCount)```
#How to print the number of players on a team?
7 messages · Page 1 of 1 (latest)