Why wont this if statement work to block people changing the team of a certain team?
if game.Players[SelectedPlayer].TeamColor ~= ("Shamrock") then
script.Parent.MouseButton1Down:connect(function(p) SelectedPlayer = script.Parent.Parent.TextBox.Text if game.Players[SelectedPlayer].TeamColor ~= ("Shamrock") then game.Players[SelectedPlayer].TeamColor = BrickColor.new(team) game.Players.LocalPlayer.PlayerGui.Classification.Enabled = false else print("cant change officers") end end)
Thank you in advance!