How to fix hats not being placed right when trying to weld to NPCs?

Hello!
I am trying to add hats to some NPCs that have waving animations.
However, i seem to have difficulties making the hats stick with the npcs as they move.

When i try to weld the accessories, they seem to either anchor the NPC in place, or glitch into their head and I have to move them back, which breaks the weld.

Any tips on adding accessories to NPCs?

is the accessory anchored? if it is, then that may be the one anchoring the npc

Ive tried unanchoring them, but the hat doesnt snap to the NPC’s head. It pulls the NPC up to the hat, which breaks the NPC.

can i see how you weld the hat?

do you mean instead of the hat going to the npc the npc goes to the hat?