Does disabling a script disconnect all events made in that script when it was enabled?

Let’s also assume that the instance being connected to, like a basepart instance, for example, connected to a touch event, wasn’t destroyed. Only the script that created the event was disabled but NOT destroyed. Does that specific event still exist somewhere causing a memory leak? I’ve been looking around online, but the answers have been very hit and miss and unclear on the matter. Thank you very much for your help.

Setting a script to Disabled does not stop it from running. The setting only seems to affect scripts that are set to Disabled on startup. If setting a running script to Disabled, you will find it continues to function.

1 Like

When a script is disabled/destroyed, its current thread(what the script is currently running at) will still continue. However, new threads will not start until the script is reenabled again.

If you want to make the script stop completely, you can set up a variable then detect if the script has been disabled or destroyed.