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

Interrupting A Script?

Asked by
Vezious 310 Moderation Voter
8 years ago

Is there any other way to stop a script whenever a event is called? So, What I need is a script that Stops another script when they find the last survivor. The Only Method I know is script.Disabled. Is there another way?

0
You can always Remove the script which sets it Parent to nil then you can reset its Parent back at a later point. UserOnly20Characters 890 — 8y
0
@UserOnly16Characters - I think Disabled effectively does the same thing chess123mate 5873 — 8y
0
script.Parent.Archievable = false duckyo01 120 — 8y

1 answer

Log in to vote
0
Answered by 8 years ago

The best way is to somehow tell the script to stop. That other script must monitor for this "message" and then stop whatever it's doing at that time. Best ways to communicate this message:

  • BindableEvent (or RemoteEvent if you're going from client->server or server->client)
  • ModuleScript (if both scripts are on the server, a ModuleScript can store the current status)
Ad

Answer this question