I have a script that counts the amount of players on a team every second.
while true do
local team = game.Teams.Lobby
local players = team:GetPlayers()
print(#players)
wait(1)
end
The way my game works is when you join your automatically on the lobby team, from there you choose what team you want to be on.
However, when I joined the game, it showed 1 player on the lobby team which is true, but then I changed my team to Red team, and the script is still showing 1 player on the lobby team even though there are no players in the lobby team.
Could anybody explain what I’m doing wrong?

1 comment
Nevermind I found out the problem, I was doing this in a local script and all the team changes were server side not client side