Detection of players in a team not working?

Greetings, I have a script here that I’m trying to make check if there’s 0 players on a team, however that’s not working.

Is there something wrong I did?

	local Teams = game:GetService("Teams")
	local Players = Teams["Team1"]:GetPlayers()

		if #Players == 0 then
			print("0 Players detected")
			
		end

No just make sure that the team actually exists

image
Despite there being a player on the team, the script is still printing, however.

I think It’s because it should be ran by client not server