I am trying to make a humanoid's body disappear, but every time I run the script, I see "Workspace.Dummy.Humanoid.Script:7: attempt to index nil with 'Health'" in the output, Anyone know how to fix this?

Dum = script.Parent.Parent
function remove()
	wait(1)
	Dum:ClearAllChildren()
end
while true do
	health = script.Parent.Health
	if health == 0
	then
		remove()
	end
	wait(0.1)
	print(health)
end

1 comment

0

wait for child