Help with overhead bug

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Fixing my overhead without everyone getting a mid rank

  2. What is the issue? Everyone get’s mid rank and like everyone gets blue rank and yellow rank

  3. 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

https://i.imgur.com/MAURcQl.png https://i.imgur.com/RFMIbAk.png

Just noticed that it stops if its bigger so It wont get anyfurther

Add a stop like this

Grouprank >= 242 and Grouprank <= 248

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.