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

Whats the difference between Destroy() and Remove()?

When should I use Destroy() and Remove()? Are they the same?

1 answer

✓ Accepted answer

Even if this question is already answered, I'll answer it anyway. They do not do the same thing.

#Remove The Remove method only set the parent of the object you called it on to nil, meaning it can easily be reparented back into the workspace or wherever you removed it from.

#Destroy The Destroy method does the same, but it locks the parent property, so it cannot be reparented, and prepares the object for garbage collection. It is then garbage collected once there are no more references to the object you called Destroy on. In a way it could help performance.

Here is an article that explains this too.

3 comments

1

Destroy also disconnects all the event connections made to the object.

0

yeah

0

Ok thanks for the information,sorry about earlier.My bad

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