I would like to understand the following scenario. Two parts are colliding with each other. One was destroying itself and the other had some logic based on the touchedPart attributes. The code was crashing because the script was accessing the parent of the destroyed part which nil due to the destruction.
I fixed this issue by the DebrisService, with a delay of 0, which I understand delegates the :Destroy() call. While this does seem to solve the problem, I am uncertain if there are any side-effects? Is this the right solution? Is my understanding accurate?
During testing, I also tried using :ClearAllChildren() which would only trigger the OnTouched of the object which destroys itself but not the other OnTouched function, which was still not what I expected.
Attachment Baseplate.rbxl (22.3 KB)