I made this to search for a way to attach accessories but it does not work, the accessory just falls to the ground.
for i,v in pairs(game.ReplicatedStorage.Hats:GetChildren()) do
print(v.Name)
local h = c:FindFirstChildOfClass("Accessory")
if h then h:Destroy() end
local hc = v:Clone()
local att = hc.Handle:FindFirstChildOfClass("Attachment")
att.Position = c.Head.Position
hc.AttachmentPos = c.Head.Position
hc.AttachmentPoint = c.Head.CFrame
hc.Parent = c
c.Humanoid:AddAccessory(hc)
wait(3)
end
I know there are similar questions, but none of them solve my issue or provide an insightful answer.

1 comment
You do not need to setup the accessory, AddAccessory will use the attachment system to connect the attachment to the player.