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

Would a script run again if it was disabled and enabled?

Asked by 6 years ago

Say in another script it would turn on the disabled behaviour. If I were to turn it on, off, then on again, would it run?

1 answer

Log in to vote
0
Answered by
Griffi0n 315 Moderation Voter
6 years ago

What will happen is that the script will continue running from where it last was. Example:

print("hello")
script.Disabled = true
print("hi")

Another script:

wait(5)
script.Parent.Script.Disabled = false

What will happen is that it will print hello then wait 5 seconds then it will print hi

0
Oh thanks dude! GIassWindows 141 — 6y
0
but wait, if it ends, does that mean the script's done? GIassWindows 141 — 6y
0
Yes Griffi0n 315 — 6y
Ad

Answer this question