I am making a prison style game and before the player is placed into the game they are prompted with a GUI that allows them to choose guards or prisoners. How can I make it that when the guard team reaches 11 players (the max amount of guards I want) if a player clicks the guard choice they will instead be given a message saying team full instead of being spawned in as a guard. Here is my code:
plr = script.Parent.Parent.Parent.Parent.Parent
function Click(mouse)
plr.TeamColor = BrickColor.new("Really Red")
wait(0.1)
plr:LoadCharacter();
end
script.Parent.MouseButton1Down:connect(Click)

3 comments
Actually attempt it first
I have attempted it however nothing i've tried has worked so this is the code that I didn't delete.
You would need to put an if statement, to see how many players there are.