How to detect how many players we have on a team

I maked this script

	local playersOnTeam = game:GetService("Teams")["Fight"]:GetPlayers()
		local numberPlayersOnTeam = #playersOnTeam
		
		repeat task.wait(x) until #playersOnTeam == 2  -- detect if the Fight team have 2 player
		print("1vs1 started")

		repeat task.wait(x) until #playersOnTeam <= 1 -- detect if the Fight team have 1 player
		print("Winner Won")
		
		wait(5)
		print("Winner Time End")
		
		local target = Vector3.new(101.477, 8.527, 70.37)
		for i, v in pairs(game.Players:GetChildren()) do 
			v.Character.Torso.CFrame = CFrame.new(target + Vector3.new(0, i * 5, 0)) -- Adds an offset of 5 .
			print("Round End")

So i want make system like if the team “Fight” have 1 players then he won and teleport every player on a blue team spawn to reset all team but that not work ( This script is a local script )

-Thnks for the help

Change the script to server script.