This bindable event is firing multiple times

The first time the function runs is 1, then its 2, then 3 ect, at the same time. I cant seem to figure out why exactly it is doing this. It is causing the script to error as the item is deleted the first run.

Code:

local Event = Explode.Event:Connect(function()
						for Index, Bloon in ipairs(game.Workspace.Bloons:GetChildren()) do
							if Bloon:FindFirstChild("Humanoid").Health > 0 then
							local Mag = (Projectile.PrimaryPart.Position - Bloon.PrimaryPart.Position).Magnitude
							if Mag < Stat.BlastRange then
								Bloon:FindFirstChild("Humanoid").Health = Bloon:FindFirstChild("Humanoid").Health - Stat.Dmg
								end
							end
						end
					end)
local Detonate = script.Parent
local Explode = game.ServerScriptService.Events.Explode

Detonate.Touched:Connect(function()
	Detonate.Anchored = true
	Detonate.CanCollide = false
	local Boom = game.ServerStorage.Objects.Impact:Clone()
	Boom.Parent = Detonate
	--print("Event Sent")
	Explode:Fire()
end)

Any advice?

Because Detonate doesn’t has any debounce, 2nd you’re not checking if Detonate was touched by a humanoid or anything,
Third:
No debounce!!!

I added a debounce it still ran more than once. And it detonates when it touches anything.

what was solution bruh i have same problem

did u find a solution i still got the same problem

In all likelihood it is a debounce issue. An event signals multiple times and thus the bindable event triggers multiple times. Find a way to prevent the multitrigger from/by the root source

Ok,i have the solution here is the solution

No debounce for that script,and show me the fixed code

This was a necro-post. The solution was that the event was being connected several times to the same object because I was not disconnecting the event.

If I remember this code correctly considering I wrote this well over 4 years ago, I believe Explode was not a clone. Also note Detonate was not a clone. Each had events connected several times which caused the added effect. If you run this experiment, it would follow the logic of 2’s, 2 ^ 0, 2 ^ 1, then 2 ^ 0 + 2 ^ 1, then logically it would follow 2 ^ 2, 2 ^ 2 + 2 ^ 1, ect…

I do not make mistakes like this anymore, the errors I run into now are purely logical or lua runtime/compilation errors.