Hey Fellow scripters, I would like to see why my auto rank scripts aren't working.
Visitor Auto Rank:
function onPlayerEntered(plr)
if plr:GetRankInGroup(15291764) ==0 then
plr.TeamColor = BrickColor.new("Pearl")
plr:LoadCharacter()
end
end
game.Players.PlayerAdded:connect(onPlayerEntered)
Personnel Auto Rank:
function onPlayerEntered(plr)
if plr:IsInGroup(15291764) and plr:GetRankInGroup(15291764) >= 1 and plr:GetRankInGroup(15291764) <= 242 then
plr.TeamColor = BrickColor.new("Bright violet")
plr:LoadCharacter()
end
end
game.Players.PlayerAdded:connect(onPlayerEntered)
OIG Auto Rank:
function onPlayerEntered(plr)
if plr:IsInGroup(15291764) and plr:GetRankInGroup(15147821) >= 243 and plr:GetRankInGroup(15147821) <= 252 then
plr.TeamColor = BrickColor.new("Sea green")
plr:LoadCharacter()
end
end
game.Players.PlayerAdded:connect(onPlayerEntered)
JAG Auto Rank:
function onPlayerEntered(plr)
if plr:IsInGroup(15147906) and plr:GetRankInGroup(15147906) >= 1 and plr:GetRankInGroup(15147906) <= 253 then
plr.TeamColor = BrickColor.new("Burgundy")
plr:LoadCharacter()
end
end
game.Players.PlayerAdded:connect(onPlayerEntered)
NCIS Auto Rank:
function onPlayerEntered(plr)
if plr:IsInGroup(15240066) and plr:GetRankInGroup(15240066) >= 1 and plr:GetRankInGroup(15240066) <=14 then
plr.TeamColor = BrickColor.new("Crimson")
plr:LoadCharacter()
end
end
game.Players.PlayerAdded:connect(onPlayerEntered)
HQ Auto Rank:
function onPlayerEntered(plr)
if plr:IsInGroup(15291764) and plr:GetRoleInGroup(15291764) >= 243 then
plr.TeamColor = BrickColor.new("Gold")
plr:LoadCharacter()
end
end
game.Players.PlayerAdded:connect(onPlayerEntered)
The rank structure in most of these scripts are
(Regimental Ranks) Then (HQ Ranks)
Refering to see if they are in the regimental group then if they are and their rank is above 1, and under a certain rank id which would be HQ then they get rank to another team.
Although when I join the HQ Team is empty and I am in the personnel team.
Can anyone suggest a fix?
