Hey, I’m just wondering if there’s some weird functionality with hats that I don’t know about.
This code is in a script for a hat. I’m trying to make it so when the player dies, they drop the hat.
Humanoid.Died:Connect(function()
SCP.Handle.CanCollide = true
SCP.Parent = workspace
SCP.Handle.Position = Head.Position
SCP:SetAttribute("BeingWorn", false)
end)
The problem is that I don’t know why it works when the player is wearing other hats and doesn’t work when they are not wearing any other hats at all.
I just want to know if there’s some weird functionality with humanoids or something that’s preventing the hat from being dropped. No, the character isn’t picking the hat up again because the code that parents the hat to the character doesn’t run when the player is dead.