Disabled Scripts Run on Enable

I have a few scripts that are disabled. Is there a way to make them run as soon as a script enables them? Meaning, they are disabled, but a script in the game will do script.Enabled = true. Once its set to enable, is there a way to make the script detect itself being enabled and run?

A script will automatically run after going from Disabled true to Disabled false.

2 Likes

Does that apply to Local and Server scripts?

Yes. Keep in mind it’ll start from the very beginning of the script as if you just ran/created it for the first time.

Can I make a Local Script enabled from a Module Script thats required by a Server Script because its not working.

Gonna have to be more specific than that. Hypothetically in some cases it would be possible; however, sometimes the server does not have permission to see a LocalScript (due to its parent).