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

How to begin running a script after another script has been disabled?

Asked by 9 years ago

How would I begin running a a separate script after another script has disabled itself? Such as to enable the other script again.

0
I'm guessing this Question is based off of your last Question. :P It is a bad idea to use the 'Disabled' property of the 'Script' or 'LocalScript' for a 'Debounce'; The reason is because, once the Script disables itself, it won't beable to enable itself again, because once disabled, it stops all execution that the Code was running. TheeDeathCaster 2368 — 9y
0
Actually Alpha, it can enable itself again. As long as there is nothing that makes the script yield, it can be reactivated DigitalVeer 1473 — 9y

1 answer

Log in to vote
0
Answered by 9 years ago
script2 = workspace.ScriptSecond

while wait() do

if script2.Disabled == false then

script.Disabled = true

elseif script2.Disabled == true then

end

Hope this helps!

0
Thank you! Brisingr360 45 — 9y
0
Hey no problem, just like to help! User#7697 0 — 9y
Ad

Answer this question