You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? Fixing my overhead without everyone getting a mid rank
-
What is the issue? Everyone getβs mid rank and like everyone gets blue rank and yellow rank
-
What solutions have you tried so far? Did you look for solutions on the Developer Hub? I did but nothing is there
local template = game.ReplicatedStorage:FindFirstChild('TitleTemplate', true)
local players = game.Players.LocalPlayer
game.Players.PlayerAdded:Connect(function(plr)
plr.CharacterAdded:Connect(function(char)
local new = template.OverheadGui:Clone()
local user = new.Username
local rank = new.Title
local position = new.Position
if plr:IsInGroup(17259116) then
if plr:GetRankInGroup(17259116) == 1 then
rank.Text = "Recruit"
rank.TextColor3 = Color3.fromRGB(0, 0, 0)
position.Text = ""
elseif plr:GetRankInGroup(17259116) >= 242 then
rank.Text = plr:GetRoleInGroup(17259116)
rank.TextColor3 = Color3.fromRGB(0, 0, 127)
position.Text = "Mid Rank"
position.TextColor3 = Color3.fromRGB(255, 255, 0)
elseif plr:GetRankInGroup(17259116) >= 248 then
rank.Text = plr:GetRoleInGroup(17259116)
rank.TextColor3 = Color3.fromRGB(255, 255, 0)
position.Text = "π High Rank π"
position.TextColor3 = Color3.fromRGB(255, 255, 0)
elseif plr:GetRankInGroup(17259116) >= 252 then
rank.Text = plr:GetRoleInGroup(17259116)
rank.TextColor3 = Color3.fromRGB(0, 0, 255)
position.Text = "β Management β"
position.TextColor3 = Color3.fromRGB(255, 255, 0)
elseif plr:GetRankInGroup(17259116) >= 254 then
rank.Text = plr:GetRoleInGroup(17259116)
rank.TextColor3 = Color3.fromRGB(255, 0, 0)
position.Text = "β Management β"
position.TextColor3 = Color3.fromRGB(0, 85, 255)
elseif plr:GetRankInGroup(17259116) >= 253 then
rank.Text = plr:GetRoleInGroup(17259116)
rank.TextColor3 = Color3.fromRGB(255, 255, 0)
position.Text = "β Management β"
position.TextColor3 = Color3.fromRGB(0, 85, 255)
elseif plr:GetRankInGroup(17259116) >= 2 then
rank.Text = plr:GetRoleInGroup(17259116)
rank.TextColor3 = Color3.fromRGB(255, 170, 127)
position.Text = "Low Rank"
position.TextColor3 = Color3.fromRGB(255, 255, 0)
else
position.Visible = false
rank.TextColor3 = Color3.fromRGB(25, 106, 182)
end
end
user.Text = "@"..plr.Name
wait(.25)
new.Parent = char:FindFirstChild('HumanoidRootPart', true)
end)
end)
2 Likes
Try using the lower sign like plr:getrank <= 253
1 Like
Try and Print something for each rankand see the output
1 Like
It gives low rank mid rank now
1 Like
for every if else put lower sign
edit:
here you go
local template = game.ReplicatedStorage:FindFirstChild('TitleTemplate', true)
local players = game.Players.LocalPlayer
game.Players.PlayerAdded:Connect(function(plr)
plr.CharacterAdded:Connect(function(char)
local new = template.OverheadGui:Clone()
local user = new.Username
local rank = new.Title
local position = new.Position
if plr:IsInGroup(17259116) then
if plr:GetRankInGroup(17259116) == 1 then
rank.Text = "Recruit"
rank.TextColor3 = Color3.fromRGB(0, 0, 0)
position.Text = ""
elseif plr:GetRankInGroup(17259116) <= 242 then
rank.Text = plr:GetRoleInGroup(17259116)
rank.TextColor3 = Color3.fromRGB(0, 0, 127)
position.Text = "Mid Rank"
position.TextColor3 = Color3.fromRGB(255, 255, 0)
elseif plr:GetRankInGroup(17259116) <= 248 then
rank.Text = plr:GetRoleInGroup(17259116)
rank.TextColor3 = Color3.fromRGB(255, 255, 0)
position.Text = "π High Rank π"
position.TextColor3 = Color3.fromRGB(255, 255, 0)
elseif plr:GetRankInGroup(17259116) <= 252 then
rank.Text = plr:GetRoleInGroup(17259116)
rank.TextColor3 = Color3.fromRGB(0, 0, 255)
position.Text = "β Management β"
position.TextColor3 = Color3.fromRGB(255, 255, 0)
elseif plr:GetRankInGroup(17259116) <= 254 then
rank.Text = plr:GetRoleInGroup(17259116)
rank.TextColor3 = Color3.fromRGB(255, 0, 0)
position.Text = "β Management β"
position.TextColor3 = Color3.fromRGB(0, 85, 255)
elseif plr:GetRankInGroup(17259116) <= 253 then
rank.Text = plr:GetRoleInGroup(17259116)
rank.TextColor3 = Color3.fromRGB(255, 255, 0)
position.Text = "β Management β"
position.TextColor3 = Color3.fromRGB(0, 85, 255)
elseif plr:GetRankInGroup(17259116) <= 2 then
rank.Text = plr:GetRoleInGroup(17259116)
rank.TextColor3 = Color3.fromRGB(255, 170, 127)
position.Text = "Low Rank"
position.TextColor3 = Color3.fromRGB(255, 255, 0)
else
position.Visible = false
rank.TextColor3 = Color3.fromRGB(25, 106, 182)
end
end
user.Text = "@"..plr.Name
wait(.25)
new.Parent = char:FindFirstChild('HumanoidRootPart', true)
end)
end)
1 Like
Lower sign? Whatβs that. Do you mind explaining?
What do you mean everyone is getting a midrank. Do you mean even people with a higher rank is getting that?
1 Like
nope People who has lower rank is getting Middle rank
if you can tell me how ranking works then I can fix this code, because honestly I never ran a group so I dont know about this
It does still give other low ranks middle rank
Reverse the elseif orders, like highest gets checked first then goes down
Try checking the rank numbers again
They are correct, I just checked them
It goes back to the problem but welcomers get a different rank color now
Just noticed that it stops if its bigger so It wont get anyfurther
Add a stop like this
Grouprank >= 242 and Grouprank <= 248
system
(system)
Closed
#20
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.