Help with TD ability script

So, my ability script works, and detects if a certain tower is attacking so it can activate the ability. Problem is, it doesnt use the ability when the tower can one shot. I have no idea how to fix this because it works when the tower doesnt one shot. The tower for some reason, doesnt sense when the humanoid dies.

		if config:FindFirstChild("OriginalTower").Value == "Mercenary" then
			local humanoid = target:FindFirstChild("Humanoid")

			if humanoid and humanoid:IsA("Humanoid") then
				humanoid.Died:Connect(function()
					player.leaderstats.Money.Value += newTower.Config.MoneyPerKill.Value
					if newTower.Head then
						newTower.Head.MoneyGain.TextLabel.Visible = true
						newTower.Head.MoneyGain.TextLabel.Text = "$"..newTower.Config.MoneyPerKill.Value
						newTower.Head.MoneyGain.TextLabel.TextTransparency = 0
						newTower.Head.Cash:Play()
						for i = 1,10 do
							if newTower.Head then
								newTower.Head.MoneyGain.TextLabel.TextTransparency += 0.1
								newTower.Head.MoneyGain.ExtentsOffset += Vector3.new(0, 0.1, 0)
								wait(0.1)
							end
						end
						newTower:FindFirstChild("Head"):FindFirstChild("MoneyGain").TextLabel.Visible = false
					end
				end)
			end
		end

Maybe it’s pulling something that is not a humanoid yet shares the same name and gets filtered out by the if statement?

If you want to explicitly pull a Humanoid, you can use :FindFirstChildOfClass("Humanoid") instead.

Seeing that the ability appears to activate once, it could cause a situation like that. I would also make it so if it can’t find a Humanoid, just don’t use it / replenish the ability.

still doesnt seem to work.
plus, I kind of think the tower kills the enemy too fast, how do i prevent that, because i think thats the problem.

Could you provide the script where you deal damage to the enemy and active the abilitys

the one that i provided in the original post is the ability activation, and heres the damage script.

		if target.Humanoid.Jump ~= true then
			if target.Humanoid.Health < config.Damage.Value then
				target.Humanoid:TakeDamage(target.Humanoid.Health)
			else
				target.Humanoid:TakeDamage(config.Damage.Value)
			end
		end