Canceling a thread created by debris service?


I’m wondering if it’s possible to cancel a thread created by the debris service? If not is there an alternative API that may be good for me to create threads and cancel them if needed?

I was trying to use the debris service to destroy stuff in my game so didn’t have to keep decrementing counters for each individual object. There are situations in my game where if a player stumbles upon an object I want to extend the life of the object so it doesn’t get destroyed.

I tried just using int values as counters as a child under each object and this was a little messy. Any suggestions would be appreciated.

Probably can’t cancel once you’ve assigned an object to be removed, since it doesn’t create a new thread.

You can hold a reference to a deep copy of the object and in case the player comes within the set amount of time, parent the clone to let the player see it, otherwise destroy that too.

1 Like