Equip Hat Without Using Humanoid:AddAccessory?

I’ve made an npc that doesn’t use humanoids. I’ve added accessories to it and it fits perfectly, but when I turn it into a giant, the accessories aren’t aligned properly.

I think this happens because I am multiplying the mesh’s scale to fit the larger head.

Here’s the script to position the accessory on the npc:

local function equip(hat, human)
	local hatAttach = hat:FindFirstChildOfClass("Attachment")
	local humanAttach = human:FindFirstChild(hatAttach.Name, true)
	local human = humanAttach.Parent
	
	hat.CFrame = hatAttach.CFrame:Inverse() * human.CFrame * humanAttach.CFrame
	
	local weld = Instance.new("WeldConstraint")
	weld.Part0 = hat
	weld.Part1 = human
	weld.Parent = hat
end

And here’s a screenshot of the outcome when it’s on a npc scaled 10x. You can see that the hair is not aligned properly and makes the npc look like it has a receding hairline

How would I fix the alignment when I increase the size of the npc?

1 Like

You could just simply try manually setting the alignment through the script. Tedious work, but what works works.