Head isn't detecting if player is wearing headless or rthro?

So I made a nametag script, it’s set to a BillBoardGui and the Adornee is the player’s head, it works fine with normal heads, but for some reason it doesn’t work when the player has the headless head or any rthro head.

Code for setting the adornee:

game.Players.PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function(char)
		local head = char:FindFirstChild("Head")
		local hum = char:WaitForChild("Humanoid")
		hum.DisplayDistanceType = Enum.HumanoidDisplayDistanceType.None
		local nametag = game.ServerStorage.NameTag:Clone()
		
		if head then
			nametag.Parent = head
			nametag.Adornee = head
		else
    end)
end)

With headless:

Without:
image

Could you instead try placing it in the player’s HumanoidRootPart and then applying an offset to the BillboardGui so it appears at head level?

2 Likes

its working now, thanks. ‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎

1 Like
local players = game:GetService("Players")

players.PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function(character)
		if not player:HasAppearanceLoaded() then
			player.CharacterAppearanceLoaded:Wait()
		end
		
		local head = character:WaitForChild("Head")
		local mesh = head:FindFirstChildOfClass("SpecialMesh")
		if mesh then
			if mesh.MeshId == "http://www.roblox.com/asset/?id=134079402" then
				--Is headless.
			end
		end
	end)
end)

Code for detecting if a player’s character is wearing the head component of the “Headless Horseman” package.

1 Like

thanks, will definitely use this in the future