Billboard gui on a player

Okay but I want to see the schema of your Billboard gui in Explorer tab.

image

Explorer not properties okay and change your code to:

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
        print(Player.Name.."Has a role in group")
        BillboardClone.TextLabel.Text = v["RoleText"]
   else
        print(tonumber(Player:GetRoleInGroup(GroupId)))
        BillboardClone.TextLabel.Text = "Player"    
      end
end
    end)
end)

And please send me output again after you change the code.

Ah! found why it says player i think

local GUI = -- Path to GUI
local GroupID = -- ID Here
game.Players.PlayerAdded:Connect(function(Player)
Player.CharacterAdded:Connect(function(Character)
local GUIClone = GUI:Clone()
GUIClone.Label.Text = Player:GetRoleInGroup(GroupID)
GUIClone.Parent = Character.Head
end
end)

ill try that one out Cool Generator

1 Like

nope, i need it so 1 rank gets a billboard gui, not every rank if you get what i mean.

Did you even check my post at all yet?

Reference:

oh sorry no i didnt, my bad mate, i just tested it it does work i just need to make sure it doesnt work on a account that does not have the rank

I edited my prior script, this should work for what you want it to do now. Just change everything accordingly. the Print(“… is Added”) ones like that are to check your script to see where something goes wrong. If the print doesnt print, then the previous line of code failed.

-- place Script in ServerScriptStorage
-- Place Billboards in ServerStorage
-- Change groupId to your group's ID
-- Change the TextLabels to be how you want them to be

local groupId = 4759895 -- Your Id
game.Players.PlayerAdded:Connect(function(player)
	print("Player is Added") -- Checks if PlayerAdded was successful. Delete me if successful
	
	if player:GetRoleInGroup(groupId) == "Jefe" then -- change it to what rank named is
		print("Role is gotten") -- Checks if GetRoleInGroup was successful. Delete me if successful
		
		player.CharacterAdded:Connect(function(characterMember)
			local JefeBillBoard = game.ServerStorage.JefeBillBoardGui:Clone() -- change JefeBillBoardGui to your name
			JefeBillBoard.Parent = characterMember.Head 
			print("Player is Named") -- Checks if Cloning and Re-Parenting was successful. Delete me if successful
			
		end)
	end	
end)

thank you mate it works now i just have to rescale the guis to fit the head of the character

1 Like