Hat can not be picked up, and falls trough the floor

Hello, I recently had this problem occurring: the game is supposed to drop the hat (which you can pick up) when you die by cloning it from server storage and pasting it in the workspace within the player’s position head. Meanwhile, when you die, collisions reset and it falls through the floor.

I tried to enable collisions after death but it didn’t seem to work. I also anchored the crown, and after death for some reason, you weren’t able to pick it up.

Here is the code (in starter character scripts) which is used to drop the hat on death.

local hat = game.ServerStorage.Crwn
local character = script.Parent
local humanoid = character:FindFirstChild("Humanoid")
local player = game.Players:GetPlayerFromCharacter(character)


humanoid.Died:Connect(function()
	if character:FindFirstChild("Crwn") then
    	local clone = hat:Clone()
		clone.Parent = workspace
		clone:FindFirstChild("Handle").CFrame = character.Head.CFrame
		clone.CFrame = character.Head.CFrame
	end
end)

Thanks for helping me out!

Anchor the hat’s BasePart instance named “Handle”.

I don’t understand exactly what you want. The script says something else you want to do. The script teleports the hat to the head.

It did not work. The hat is for some reason still falling.

1 Like

I want it to have collisions with the ground because it’s falling through it. Also, I fixed the issue by changing the position of the hat in server storage, I have no idea how it worked, but it’s fixed now.

1 Like