I put this into a local script.
player = game.Players.LocalPlayer script.Parent.MouseButton1Click:connect(function(mouse) if player:IsInGroup(3083232) then if player.TeamColor ~= BrickColor.new("Bright yellow") then player.TeamColor = BrickColor.new("Bright blue") end end end)
The whole thing works, I change teams fine. I made it so that if they are in the group, the can change. Then If they are not a prisoner. It works and all, however I can't respawn in the correct area. I keep spawning in the starting team area.
This wouldn't be an issue with the script, rather an issue with your spawn point settings, check the property's of the spawn bricks, make sure each property is correct.