Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Is there a way to disable all scripts with the same name with a script?

Asked by 4 years ago

I made some Christmas lights while have the ability to be turned on and off with a script but due to the amount of parts it changes it causing some lag in the game at the moment so I was wondering if there is a way to disable all the scripts with a single script during the time I am not using the lights.

0
Can use either :GetChildren() or :GetDescendants() https://developer.roblox.com/en-us/api-reference/function/Instance/GetDescendants ForeverBrown 356 — 4y
0
Don't disable scripts - instead use a flag. https://techterms.com/definition/flag incapaz 195 — 4y
0
You don't even need to disable any scripts. You can use an event listener in every script. DeceptiveCaster 3761 — 4y
0
You can loop the scripts and disable them. 123nabilben123 499 — 4y

Answer this question