I am trying to count how many players are in a team, and then i'm going to put that amount of players in a number value in server storage. I'm using a script on a part only to test out if its working, but I don't think it is. Do you see any problems with it? (i'm a very beginner scripter)
this is the one i will use..
local players = game.Teams.Playing:GetPlayers()
game.ServerStorage.PlayerCount.Value = #players
and this is the one I made just to test if its working.
while true do
if game.ServerStorage.PlayerCount.Value == 1
then
script.Parent.Transparency = .5
end
wait(.00001)
end
(also im using one player because when I test it in the studio, its just one player on the playing team, me) Thank you in advance!

2 comments
Thank you so much, this really really helped!
I'm glad I could help!