Do you have to disconnect connections even when you are destroying the part?

Do you have to disconnect connections even when you are destroying the part? does this get rid of the connection and is garbage collected or would I need to disconnect it before it is destroyed.

1 Like

Everything parented under a destroyed instance is also automatically destroyed, meaning that any scripts parented to the destroyed part will disconnect automatically.

1 Like

For this very reason you should always use the Destroy function on unneeded parts - it automatically disconnects these and allows garbage collection so that memory leaks do not happen.

1 Like