I’ve been trying to make a secured group rank team and for some reason this isn’t working right. Am I doing it right or wrong?
SCRIPT:
game.ReplicatedStorage.Events.TeamEvent.OnServerEvent:Connect(function(player, Team)
if Team == "Toddler" then
player.TeamColor = game.Teams:FindFirstChild(Team).TeamColor
player:LoadCharacter()
elseif Team == "Nurse" then
if player:GetRankInGroup(5251616) == 3 then
player.TeamColor = game.Teams:FindFirstChild(Team).TeamColor
player:LoadCharacter()
elseif Team == "Assistant Teacher" then
if player:GetRankInGroup(5251616) == 4 then
player.TeamColor = game.Teams:FindFirstChild(Team).TeamColor
player:LoadCharacter()
elseif Team == "Teacher" then
if player:GetRankInGroup(5251616) == 5 then
player.TeamColor = game.Teams:FindFirstChild(Team).TeamColor
player:LoadCharacter()
elseif Team == "Supervisor" then
if player:GetRankInGroup(5251616) == 6 then
player.TeamColor = game.Teams:FindFirstChild(Team).TeamColor
player:LoadCharacter()
elseif Team == "School Counselor" then
if player:GetRankInGroup(5251616) == 7 then
player.TeamColor = game.Teams:FindFirstChild(Team).TeamColor
player:LoadCharacter()
elseif Team == "School Administrator" then
if player:GetRankInGroup(5251616) == 8 then
player.TeamColor = game.Teams:FindFirstChild(Team).TeamColor
player:LoadCharacter()
elseif Team == "Vice Principal" then
if player:GetRankInGroup(5251616) == 9 then
player.TeamColor = game.Teams:FindFirstChild(Team).TeamColor
player:LoadCharacter()
elseif Team == "Principal" then
if player:GetRankInGroup(5251616) == 10 then
player.TeamColor = game.Teams:FindFirstChild(Team).TeamColor
player:LoadCharacter()
elseif Team == "Headmaster" then
if player:GetRankInGroup(5251616) == 11 then
player.TeamColor = game.Teams:FindFirstChild(Team).TeamColor
player:LoadCharacter()
elseif Team == "Superintendent" then
if player:GetRankInGroup(5251616) == 12 then
player.TeamColor = game.Teams:FindFirstChild(Team).TeamColor
player:LoadCharacter()
elseif Team == "Vice President" then
if player:GetRankInGroup(5251616) == 13 then
player.TeamColor = game.Teams:FindFirstChild(Team).TeamColor
player:LoadCharacter()
elseif Team == "President" then
if player:GetRankInGroup(5251616) == 14 then
player.TeamColor = game.Teams:FindFirstChild(Team).TeamColor
player:LoadCharacter()
end
end
end
end
end
end
end
end
end
end
end
end
end
end)