Tool Unequip when Player Dies

Does anyone knows how to script “Unequip a Tool when a Player Dies”.

instead of using StarterGear
I would just set the tool’s parent to the Backpack directly, this way it doesn’t save on death

local tool = script.Parent

tool.Equipped:Connect(function()
	local character = tool.Parent
	local humanoid = character:WaitForChild("Humanoid")
	humanoid.Died:Connect(function()
		tool:Destroy()
	end)
end)
local tool = script.Parent

tool.Equipped:Connect(function()
	local character = tool.Parent
	local humanoid = character:WaitForChild("Humanoid")
	humanoid.Died:Connect(function()
		humanoid:UnequipTools()
	end)
end)
2 Likes

thanks man for the help! This really help!