I took a hair model from roblox toolbox and I copied a YouTube video https://www.youtube.com/watch?v=XIzBKh0BIdU&ab_channel=MERTO , at 1hr, 8mins and every code I copied still doesn't work. I mostly think it has to do with the accessory thingy as I have tried with many items and objects and it never works.
Sorry if my explanation is bad :(
Try:
Dummy.Humanoid:AddAccessory(Hat:Clone())
Instead of Parenting the Accessory directly:
Hat:Clone().Parent=Dummy