local plr = script.Parent.Parent.Parent.Parent.Parent.Name

script.Parent.MouseButton1Click:connect(function()
	game.Players[plr].TeamColor = BrickColor.new("Really red")
	script.Parent.Parent.Parent.Enabled = false
end)

okay so that is my script but if pepole join they can join the same team over and over with not goning inside of the blue team so the teams get unbalanced how to make it if 1 play joins red the other one has to join blue just like in prison life where it says team is full but the message will be error:cant join team due balance

thanks for helping