The anonymous function to spawn is still able to reference it.
Oh, is that a thing?
I thought if it wasn’t used it would GC.
Crap. Time to rewrite a lot of stuff.
Check this post out too. Looks like a similar request (that even has the same name).
Edit: I’ve been trying to figure out if the module I posted in that thread still works. It shows some very strange behavior in studio, but it seems to work perfectly online. In studio, it will only detect when instances are garbage-collected from nil if the instance and the detection code are run as soon as the game starts. Online it doesn’t matter and it will detect when an instance is garbage-collected regardless of when it is ran. :Destroy()
detection works fine in both studio and online.
I’d like Instance.IsDestroyed to be implemented, it would be very helpful