Explosion.Hit not firing when instantiator of explosion is destroyed

I instantiate an explosion object, but the explosion.Hit does not fire if the object that instantiated the explosion is destroyed. The explosion is not parented to the destroyed object.

  1. What do you want to achieve? To instance an explosion and be able to detect its Hit event, and then to destroy the parent of the script that created the explosion

  2. What is the issue? The event does not fire, seemingly for no reason.

  3. What solutions have you tried so far? removing the script.Parent:Destroy() line of code which works but is not a viable solution

This code is located inside of a basePart

wait(5)

local explosion = Instance.new('Explosion')

explosion.Hit:Connect(function()
	print('hit') -- the console does not print "hit"
end)

explosion.Parent = game:GetService('Workspace')

script.Parent:Destroy()

Why does it not fire and why is the basePart being destroyed effect the explosion?

1 Like