How to make a magnitude range damage?

So i am trying to make this like a explosion damage thats only one time but somehow its doing it repeatedly, anyway to make it so it gets all the zombies in range just take 30 damage? instead of it doing it in a fast loop.

	for i, v in pairs(enemies:GetChildren()) do
		local distance = (v.Torso.Position - script.Parent.Position).Magnitude
			
		if distance < 24 and debounce == false then
		    v.Zombie.Health =- 30
			--script.Parent.ExplosionEffect.Enabled = true
			script.Parent.Transparency = 1
--			script.Parent.Explosion.Visible = true
		    script.Parent.EXP_Triggered.Value = true
			script.Parent.Triggered.Value = false
			print('Dealt 30 DMG to ', v.Zombie.Name)	
			print(distance)		
		end	
		print(distance, ' distance to ', v.Zombie.Parent.Name)		
			
			
    end
	debounce = true	
	wait(9999999999999999)

	

Well what you are doing is as follows, you loop through every enemy. If the enemy is nearby (24 studs) and debounce is false then you damage them. So you would damage ALL enemies who are within a 24 stud radius. Instead you first want to get the nearest enemy.

local nearestEnemy, nearestDistance = nil, 0
for _, enemy in pairs(enemies:GetChildren()) do
	local d = (enemie.Torso.Position - script.Parent.Position).Magnitude
	local hum = enemy.Zombie

	if d < 24 and debounce == false and hum.Health >= 0 and (not nearestEnemy or d < nearestDistance) then
		local nearestEnemy, nearestDistance = enemy, d
	end
end

if nearestEnemy then
	... -- part of the code to damage the enemy
end