Destroy NPC Model on hit

How do i make that when a NPC hits on a part and he destroys itself?

I’m trying to make that while making a Defending game.

The part that i want to make it destroy is this:

image

I need help, I really appreciate if you know how to do it.

Depends on what you mean by “destroys” itself. Assuming the NPC has a humanoid in it you can do something like this

local killPart = script.Parent
while true do
	local hitPart = killPart.Touched:Wait()
	local model = hitPart.Parent
	local human = model:FindFirstChildWhichIsA("Humanoid", true)
	if (human) then
		human:TakeDamage(human.MaxHealth + 1)
	end
	wait(1) -- Debounce
end
1 Like

Oh, it seems to work.. Well thanks.