I've been trying to figure out how to clone an entire player head on the click of a gui button, but I can't get the accessories on the head. This is my code for getting the accessories:
`for i, Accessories in pairs(player:GetDescendants()) do
if Accessories:IsA("Accessory") then
newAccessory = Accessories:Clone()
newAccessory.Parent = Model
newAccessory.Handle.AccessoryWeld.Part0 = newAccessory:FindFirstChild("Handle")
newAccessory.Handle.AccessoryWeld.Part1 = Model.Head
``
Accessories:Destroy()
end
end`
Is there a problem with the code? Also is there a way to only get hat accessories instead of others like back accessories?

2 comments
(Edit) Sorry I didn't know how to format the code block
.Have you tried humanoid description?