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

How to make a script wait for another script to end?

Asked by 8 years ago

So i have one Script that says: "Loading Game" and i also have another Script that shows a Cut scene. I want it to where when my Loading Game script ends it will activate my Cut scene script. What would i have to add to do this? Thanks.

1
Put it in the same script. Then you can just put the loading part above the cutscene. Perci1 4988 — 8y
0
Thanks, that's actually what i think i'm going to do IdeaBrick 15 — 8y

2 answers

Log in to vote
0
Answered by 8 years ago

This might work:

--This code Represents script 1
--Put the stuff you want it to do here
workspace.Script2.Disabled = false --Change the workspace.Script2 to the script that you're using, also, make sure the 2nd script is disabled by the disabled property.

So in script1 you'd have your code, then at the end of the code, you tell it to enable the 2nd script that is disabled.

If I helped, please make this an acceptable answer and upvote it. Thanks :)

0
Thanks for the help, i think i've got it down now ;) IdeaBrick 15 — 8y
0
No problem! Thundermaker300 554 — 8y
Ad
Log in to vote
2
Answered by 8 years ago

If you the script to run when its done then just activate the script with the script disabled boolean value instead of disabled being true change it to being false in the script after the loading is over.

Answer this question