Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Should Game.Debris be used or :Destroy() ?

So, I want to make a part disappear or be eliminated from the game world. Which do I use, destroy or adding to game.debris? Please respond.

1 comment

0

Debris was used in the old days. I'd use Destroy

1 answer

✓ Accepted answer

The Debris service is usually used when you want an instance to be removed from the game after a set period of time. This is usually in cases like shooting a projectile or when you have any instance that has a specific lifetime.

If your part does not have a set lifetime, and instead you would like for the part to be removed upon a certain event triggering, or anything otherwise then feel free to use :Destroy().

Also note that Debris does not error if the object is already destroyed when it tries to remove the object, however :Destroy() does.

Hope this helps! :)

1 comment

0

You sniped me, I'm 50 seconds to late, I'll remove my answer as yours is better.

This discussion is preserved as it was. New answers, comments, and votes are closed.