Billboard gui on a player

Hey there dev form i have pre made my Billboard gui and i need it on a certain persons rank in a group any ideas?
image

3 Likes

If you want an ranklabel on group, try this.

if player:GetRankInGroup(GroupId) >= 255 then
   Label.Text = player:GetRoleInGroup(GroupId)
else
Label.Text = "Player"
end
1 Like

so will that go on the players head too? i dont really know how programming works

No, im edit it so the “player” rank is on other players with an other rank.

ah, any idea how to put it on the character

Maybe this works

 local gui = script.Rank 

game.Players.PlayerAdded:connect(function(plr)
plr.CharacterAdded:connect(function(chr)

local guic = gui:Clone()
wait() guic.Parent = game.Workspace[plr.Name].Head
guic.Enabled = true

ok so add that script and this one too

if player:GetRankInGroup(GroupId) >= 255 then
   Label.Text = player:GetRoleInGroup(GroupId)
else
Label.Text = "Player"
end

Yeah, if it won’t work say it. Then i change the script.

yeah that didn’t work, if the player doesn’t have the rank in the group can it not give them any tag at all?

Alright, i need to go now. So i respond soon!

ok ill see you later :wave: :+1:

you can just setup table with roles

local tablewithroles = {
   [255] = {RoleText = "Owner"},
   [240] = {RoleText = "Admin"},
}

game.Players.PlayerAdded:Connect(function(Player)
Player.CharacterAdded:Connect(function(char)
local Head = char.Head
local BillboardClone = yourpathtobillboardgui:Clone()
local GroupId = --your group id

BillboardClone.Parent = Head


for i,v in pairs(tablewithroles) do
   if v[tonumber(Player:GetRoleInGroup(GroupId))] then
        BillboardClone.TextLabel.Text = v["RoleText"]
   else
        BillboardClone.TextLabel.Text = "Player"    
      end
end
    end)
end)

that should work on the player now?

wait lemme change it a bit :)))

ok, its just for 1 role in the group for the billboard gui

Basically the numbers in the table is the RoleID

Assuming from the OP & Image here:

local GroupID = 00000000000000
local RankRequirement = 255

game.Players.PlayerAdded:Connect(function(Player)
    Player.CharacterAdded:Connect(function(Character)

        if Player:GetRankInGroup(GroupID) == RankRequirement then
            local GuiToClone = game.ServerStorage.BillboardGui:Clone()
            GuiToClone.Parent = Character:WaitForChild("Head")
        end
    end)
end)
3 Likes

yeah, where do i put the group id?

ServerScriptService inside of Script

ok! will do thanks ill see if i can get it working