Hello, I am trying to disable a script of ServerServiceScript, the 2 scripts are in ServerServiceScript, in line 50, I am trying to assign the script to disable, with the BoolValue that is in Players / Stats / BoolValue, that instance in the script, that I want that disable the other script, I hope a solution, please. Thank you.
https://pastebin.com/i3QUJjdG
From the Dev...
Scripts and LocalScripts, when parented to a valid parent, will run when Disabled is false. If Disabled is set to true whilst a script is running, the current thread will be terminated. If Disabled is set to true from false, the script will run again. This means the Disabled property can be toggled to restart a script:
scriptObject.Disabled = false scriptObject.Disabled = true
The “bool” is the “disabled” property.
Note, the above code snippet cannot be used within the script itself. This is because once the script is disabled the thread will terminate.
If you’re trying to change a value from one script to another, you can do it through bindable events/remote events etc.