So I’ve got a system in place which inserts a players hats from the server and chucks them in a folder. Then from the client, I get those hats from the folder, and throw them into a dummy. However, when parenting the hats to the dummy, they don’t actually get attached like I hat normally would.
for _, v in pairs(CustomiseStorage:GetChildren()) do
if v:IsA('Decal') then -- Face
v.Parent = Dummy.Head
else -- Hats/Hair/etc
v.Parent = Dummy
end
end
Please note, I cannot use HumanoidDescription. Please do not bring it up. It will not work. End of story.
Make sure you have attachments inside the accessories’ handles paired with correct attachment.
Attachment needs to be positioned correctly.
Code
Changed like this:
for _, v in pairs(CustomiseStorage:GetChildren()) do
if v:IsA('Decal') then -- Face
v.Parent = Dummy.Head
else -- Hats/Hair/etc
Dummy.Humanoid:AddAccessory(v)
end
end
Something you could try is manually welding the accessory on, maybe something like this:
for _, v in CustomiseStorage:GetChildren() do
if v:IsA("Decal") then
v.Parent = Dummy.Head
else
local attach0 = v.Handle:FindFirstChildWhichIsA("Attachment")
local attach1 = Dummy:FindFirstChild(attach0.Name,true)
local weld = Instance.new("Weld")
weld.Parent = v.Handle
weld.Part0 = attach0.Parent
weld.Part1 = attach1.Parent
weld.C0 = attach0.CFrame
weld.C1 = attach1.CFrame
v.Parent = Dummy
end
end