Title, how would I do it..? What I have isn't working,
game:GetService('Players').PlayerAdded:connect(function(player) player.CharacterAdded:connect(function(character) character:WaitForChild("Humanoid").Died:connect(function() local d = character:GetChildren() for i=1, #d do if (d[i].className == "Accessory") then if (d[i]:FindFirstChild("Handle")) then local hi=(d[i]:FindFirstChild("Handle")) hi.Parent=character hi.Anchored=true local w = Instance.new('Weld', character) w.Part0=hi w.Part1=character.Head end end end end) end) end)
I've been working on this for a while. The only way I have been able to keep the hat welded after death is to remove the Humanoid. I think the Humanoid keeps force-breaking the welds.
Edit: The Humanoid is definitely the issue. I tried both cloning the previous welds before death and creating new ones and they both work if the Humanoid is destroyed after death. Even if you wait after death for .4 seconds before Destroying the Humanoid, as soon as the Humanoid is destroyed then the welds begin working.