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)
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.