ddenyz
(wdenyz)
June 28, 2023, 6:06pm
#1
how could i display an icon/image above the players head depending on their rank?
game.Players.PlayerAdded:Connect(function(plr)
local ls = Instance.new("Folder")
ls.Name = "leaderstats"
ls.Parent = plr
local winsValue = Instance.new("IntValue")
winsValue.Name = "Wins"
winsValue.Parent = ls
local rankValue = Instance.new("StringValue")
rankValue.Name = "Rank"
rankValue.Parent = ls
local function updateRank(wins)
if wins >= 400 then
rankValue.Value = "Aether"
elseif wins >= 300 then
rankValue.Value = "Divino"
elseif wins >= 200 then
rankValue.Value = "Imortal"
elseif wins >= 150 then
rankValue.Value = "Supremo Lendário"
elseif wins >= 100 then
rankValue.Value = "Supremo"
elseif wins >= 80 then
rankValue.Value = "Lendário"
elseif wins >= 65 then
rankValue.Value = "Mestre"
elseif wins >= 50 then
rankValue.Value = "Destemido"
elseif wins >= 35 then
rankValue.Value = "Experiente"
elseif wins >= 5 then
rankValue.Value = "Especialista"
elseif wins >= 1 then
rankValue.Value = "Competente"
else
rankValue.Value = "Iniciante"
end
end
1 Like
You could create a billboard gui above the players heads.
Kyl3ST
(Kyl3ST)
June 28, 2023, 6:52pm
#4
well here is the model with the overhead after this is up to you to change what you want on it, bet the ranks will be in a table which in my opinion is better, don’t forget to place the scripts in the folders that i put on the parents name
overhead auto rank update.rbxm (5.5 KB)
Kyl3ST
(Kyl3ST)
June 28, 2023, 6:58pm
#5
bet here is what it will looks like
ddenyz
(wdenyz)
June 28, 2023, 7:02pm
#6
That’s what i wanted but with an image aswell !
Kyl3ST
(Kyl3ST)
June 28, 2023, 7:04pm
#7
well i got no images for it so i couldn’t
if you could provide some images i can help you
ddenyz
(wdenyz)
June 28, 2023, 7:04pm
#8
Would this work?!
local Competente = "rbxassetid://6808355480" -- Owner Rank Icon
local Especialista = "rbxassetid://6808446102" -- Dev Rank Icon
--[ GUI LOCALS ]--
local gui = game.ReplicatedStorage:FindFirstChild("Icons")
local image = gui.ImageLabel
--[ MAIN FUNCTION ]--
game.Players.PlayerAdded:Connect(function(plr)
plr.CharacterAdded:Connect(function(Character)
local ls = Instance.new("Folder")
ls.Name = "leaderstats"
ls.Parent = plr
local rankValue = Instance.new("StringValue")
rankValue.Name = "Rank"
rankValue.Parent = ls
if rankValue.Value == "Competente" then
-- OWNER ICON OVERHEAD
local gui = gui:Clone()
gui.Parent = Character.Head
gui.Adornee = Character.Head
image.Image = Competente
elseif rankValue.Value == "Especialista" then
-- DEV ICON OVERHEAD
local gui = gui:Clone()
gui.Parent = Character.Head
gui.Adornee = Character.Head
image.Image = Especialista
end
end)
end)
Kyl3ST
(Kyl3ST)
June 28, 2023, 7:06pm
#9
that think not optimized bet why are you making again the leaderstats? if it already exist in the script i provided you, and can you send an image of how you want it to look like , for example if you want the image next to the rank or …
ddenyz
(wdenyz)
June 28, 2023, 7:09pm
#10
u can choose the image u want to just as a sample
Kyl3ST
(Kyl3ST)
June 28, 2023, 7:12pm
#11
what i mean is
or something different?
ddenyz
(wdenyz)
June 28, 2023, 7:13pm
#12
the image would be above and rank below
Kyl3ST
(Kyl3ST)
June 28, 2023, 7:14pm
#13
and does you want the rank to only be for dev/owner?
ddenyz
(wdenyz)
June 28, 2023, 7:16pm
#14
there’s many ranks and the ranks are defined by wins like
if u got 10 wins ur rank is = Beginner
Kyl3ST
(Kyl3ST)
June 28, 2023, 7:17pm
#15
what i’m telling is the icon does you want it to only appear for dev/owner or for every?
ddenyz
(wdenyz)
June 28, 2023, 7:17pm
#16
everyone, so everyone could see eachothers rank
Kyl3ST
(Kyl3ST)
June 28, 2023, 8:07pm
#17
make an UI and send it so i can work on it better , i’m really getting meh of this roblox UI maker
1 Like