local groupId = 3237760
local lowranks = "4|Barista","5|Junior Barista","6|Security","10|Head Security"
local midranks = "11|Management","12|Management Team","14|Shift Manager","15|Management","16|Senior Management"
local highranks = "17|Board Of Directors","18|Vice Chairman","19|Chairman Of The Board","Co-Founder","20|Founder","Builder/GFX"
game.Players.PlayerAdded:connect(function(player)
if player:GetRoleInGroup(groupId) == lowranks then
player.TeamColor = BrickColor.new("Persimmon")
elseif player:GetRoleInGroup(groupId) == midranks then
player.TeamColor = BrickColor.new("Bright red")
elseif player:GetRoleInGroup(groupId) == highranks then
player.TeamColor = BrickColor.new("Bright blue")
else
player.TeamColor = BrickColor.new("White")
end
end)
When I play the game in studio it doesn't team me in the "Charman" team, all it does is create a neutral team and puts me there. I tried seeing if I could fix it but I do not have access to the group admin so I can see the ranks like "10,11,12"

3 comments
This is in a server script
You'll need a table for this. XP Aside from that, why not use
GetRankInGroup?I can't use rank in group because I don't know what the permission numbers are, I don't have group admin to check them.