I basically have problems with people being put in the wrong teams, using this method, Is there any way to prevent people from being put in the wrong teams?
game.Players.PlayerAdded:Connect(function(player)
if player:IsInGroup(7809126) then -- Army Command
if player:GetRankInGroup(7809126) >= 2 then
player.TeamColor = BrickColor.new("Pastel Blue")
end
elseif player:IsInGroup(7809126) then -- Army Staff
if player:GetRankInGroup(7809126) >= 1 then
player.TeamColor = BrickColor.new("Laurel green")
end
elseif player:IsInGroup(7595951) then -- MATCOM
if player:GetRankInGroup(7595951) >= 3 then
player.TeamColor = BrickColor.new("Ghost grey")
end
elseif player:IsInGroup(7454731) then -- BCT
if player:GetRankInGroup(7454731) >= 1 then
player.TeamColor = BrickColor.new("Sea green")
end
elseif player:IsInGroup(7519391) then -- ASOC
if player:GetRankInGroup(7519391) >= 2 then
player.TeamColor = BrickColor.new("Cocoa")
end
elseif player:IsInGroup(7463672) then -- Forces Command
if player:GetRankInGroup(7463672) >= 2 then
player.TeamColor = BrickColor.new("Fawn brown")
end
elseif player:IsInGroup(7521390) then -- INSCOM
if player:GetRankInGroup(7521390) >= 2 then
player.TeamColor = BrickColor.new("Dark stone grey")
end
elseif player:IsInGroup(7506593) then -- MPC
if player:GetRankInGroup(7506593) >= 2 then
player.TeamColor = BrickColor.new("Deep blue")
end
elseif player:IsInGroup(7463156) then -- TRADOC
if player:GetRankInGroup(7463156) >= 2 then
player.TeamColor = BrickColor.new("Cool yellow")
end
elseif player:IsInGroup(7454731) then -- Army Personnel
if player:GetRankInGroup(7454731) >= 2 then
player.TeamColor = BrickColor.new("Flint")
end
end
end)