How would I see if the Children are greater than a certain number. And if they are do something. I just don't know how to check the children:
function PlayerCount() PlayerCount = game.Players:GetChildren() for PlayerCountLoop = 1, #PlayerCount do leaderstats = (PlayerCount[PlayerCountLoop]:WaitForChild("leaderstats")) print(PlayerCount[PlayerCountLoop].Name .. "'s Stats") print(leaderstats.Attack.Value.. " - Attack") print(leaderstats.Defense.Value.. " - Defense") print(leaderstats.Agility.Value.. " - Agility") print(leaderstats.Energy.Value.. " - Energy") print(leaderstats["Power Level"].Value.. " - Power Level") end end game.Players.PlayerAdded:connect(PlayerCount)
I think you could just use an if statement. Try:
if #PlayerCount > 9 then -- Nine is just the example. Any number can go there