Hello, I have a script that uses collectionservice. I am new to it. For some reason it just gets stuck in the middle of the part that it touches and disappears. can somebody help me with it?

local CollectionService = game:GetService("CollectionService")
local function boom()
	local e = Instance.new("Explosion") -- IT DOES NOT HAVE TO BE "E" IT CAN BE ANY LETTER. I JUST LIKE USING THIS
	
	e.BlastRadius = 20 --THE RADIUS, THE BIGGER THE RADIUS, THE BIGGER IT IS

	e.BlastPressure = 10 -- THE BLAST PRESSURE IS HOW POWERFUL IT IS. THE HIGHER, THE MORE DEADLY AND THE MORE UNANCHORED BRICKS WILL GO FLYING

	e.Parent = game.Workspace -- DO NOT TOUCH UNLESS YOU KNOW WHAT YOURE DOING

	e.Position = script.Parent.Position
end
local function kill(hit)
	while wait() do
		wait(25)
		boom()
	end
end
for _,Bomb in pairs(CollectionService:GetTagged("Bomb")) do
    Bomb.Touched:connect(kill)
end