Humanoid.Died event doesn't fire when NPC is instantly killed

The title basically explains the issue but I’ll go into more detail.

I’m making a system where when the NPC dies it will give certain stats and then the players damage will also be buffed but the issue is when the player does enough damage to instantly kill the NPC the Died event wont fire.

The event only seems to fire when the player doesn’t instantly kill the NPC

local function NewNormalDummy(Dummy)
	Dummy.Humanoid.Died:Connect(function()
		local creator = Dummy.Humanoid:FindFirstChild("creator")
		if creator then
			local Modelplr = creator.Value
			local plr = game.Players:GetPlayerFromCharacter(Modelplr)
			local Data = DataStore.GetData(plr)
			local Boost = (25 * Data["Prestige"])
			local Text = "Str"
			
			if Data["Strength"] >= 50 then
				if Boost ~= 0 then
					DataStore.UpdateData(plr, "Strength", Boost)
						
					Ui:FireClient(plr, Text, Boost)
				end
			end
			creator:Destroy()
		end
		local OldCFrame = Dummy.HumanoidRootPart.CFrame
		
		wait(1)
		Dummy:Destroy()
		local NewDummy = game.ServerStorage.Dummies["Normal Dummy"]:Clone()
		NewDummy.HumanoidRootPart.CFrame = OldCFrame
		NewDummy.Parent = game.Workspace.Dummies["Normal Dummies"]
	
		NewNormalDummy(NewDummy)
	end)
end

For those wondering I’ve already assigned the same Died event to the first dummy and then it will call the function above causing an endless loop of the function being called everytime the dummy dies.

You need to fire that function outside so it can work. (Fire NewNormalDummy)

I have at the bottom of the post I stated this.

And it worked until the player starts instantly killing them.

EDIT: I understood what you meant but there was no issue with calling the function inside it.

Does the NPC have a humanoid?, i think the event only fires for live players.

Instead maybe do humanoid.health = 0 then?

I’ll check (30 charararararas)

I tried with Humanoid.HealthChanged but instead I just got a weird bug where it didn’t update my data

Humanoid.Health = 0? (30 charss)

Yeah I checked if the New Health was smaller or equal to 0.
I checked the dummy and it still has the Humanoid

I never found out what the issue was but I found a roundabout method of fixing this.

						if not game.Players:GetPlayerFromCharacter(Hum.Parent) then
							if NewDamage >= 100 then
								Hum:TakeDamage(99)
							elseif NewDamage < 100 then
								Hum:TakeDamage(NewDamage)
							end
						elseif game.Players:GetPlayerFromCharacter(Hum.Parent) then
							Hum:TakeDamage(NewDamage)
						end

I replaced the Humanoid:TakeDamage() with this.
Since the Died Event didn’t fire when it took 100 or more damage I made it so if the damage is above 100 it does 99 instead and it only does this for NPC’s.