Tools getting deleted

i want the tools to get deleted when the player dies however the script im showing goes off before you die even when youre gaining health

script

elseif humanoid.Died then
	print("Dead")
	destroyField(char)
	for i , v in pairs(folder:GetChildren()) do
		print(v.Name)
		v:Destroy()
	end
	
end

end)

15:25:46.020 Stun - Server - ToolStun:39
15:25:47.020 Dead - Server - ToolStun:104
15:25:47.021 Tool1 - Server - ToolStun:107
15:25:47.021 Tool - Server - ToolStun:107
15:25:48.038 :arrow_forward: Dead (x3) - Server - ToolStun:104

the amount of (Deads) are happening when i gain a hp

Humanoid.Died

is an RBXScriptConnection, this does not return a boolean.

2 Likes

Tools are automatically erased from a player’s backpack when they die, as far as I know.

its not in their backpack that cause im putting the tools in server storage