Stop A Thread When A Part Is Deleted

Join the club :slight_smile:


On a more serious note, using Instance.AncestoryChanged and then checking if the new parent is nil works pretty well. It’s different than the object actually being “destroyed” but it’s usually about the same thing.

Are you using coroutines or roblox events/connections? If you’re using connections, just store them in a table then loop though that table disconnecting them when the parent changes to nil.

Let me know if you’ve got any questions/or if this doesn’t work for you because Roblox still hasn’t added a Destroyed event like Unity :+1:


Using events of the Part also works. Note this might not be possible in all cases though, like when you need RunService events.