Hello, I’m currently having an issue with setting the Adornee of a BillboardGui to the Head of a player’s character. It doesn’t work for some reason.
I have tried setting the Adornee to any other part within the Character and it works.
function player_data.OnCharacterAdded(player, character)
local humanoid = character:WaitForChild("Humanoid")
local head = character:WaitForChild("Head")
local storage = workspace.player_headers
local header = GuiStorage.player_header:Clone()
header.Name = player.Name
header.Adornee = head
header.plr_name.Text = player.Name
local size = getTextSize(header.plr_name)
header.plr_name.Size = UDim2.new((size.x + 60)/275, 0, 0.25, 0)
header.Parent = storage
end
There are no errors.
Here are some screenshots:
If I try and set the Adornee to Head, nothing happens.
If I try to set the Adornee to literally any part within the character
That’s because you’re wearing headless head, it will work with any other head. You’ll need to modify the script to account for player’s wearing headless head.
That seems to be the issue, but I can’t find any solution to check whether the player is wearing headless or not. The head transparency does not change at all.
Yeah, but on any other places I tried it works fine with and without headless. I don’t get it why here it doesn’t work for headless. There’s no code that would interfere with it.
Yeah, that’s a way to check whether its headless or not. But I have the same code in a different place and it works fine without having any checks for headless.