Is there an event for when debris:additem destroys a basepart?

i always use debris:additem for when i need a basepart to exist for a certain time but i ran across a problem where the instance.Destroying event does not work when debris:additem() is used on the instance. i know instance.Destroying is only supposed to be used when a basepart gets destroyed by instance:Destroy(), but if there is a event for that, is there an event for when a basepart gets destroyed through debris:additem()?

please help me im trying to work as fast i can on this project so i dont lose interest like i always do on every other one i work on.

instead of debris, why not just do this:

task.delay(duration, function()
    instance:Destroy()
end)

It seems that is not the case. It detected on Destroying event.

local Debris = game:GetService("Debris")

local part = Instance.new("Part")

part.Parent = workspace

part.Destroying:Connect(function()
	print("PART IS DESTROYED")
end)

Debris:AddItem(part, 3)

ok so i found the solution, in my code where my hitbox thingy waits to find parts that intersect with the hitbox, instead of the code repeating until something has intersected with the hitbox or the hitbox being nil, i also checked if the parent of the hitbox is nil and it works perfectly, thanks for helping me though.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.