Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Is there a way to make a part of a script after a part of another script?

Hi, I would like to know if there is a way to make a part of a script start after another script, for example if I wanted to print hello in one script, something can be added to begin a different script that does other things.

Like is there a function like script.OtherScript (OtherScript is an example name of another script) to use or another way to trigger another script?

I do not really think this is possible, but I would like to make sure.

2 comments

0

do you mean a script that triggers another script?

0

Yes

1 answer

✓ Accepted answer

You can use Global Values for this.

script 1:

print('hello')
_G.Activate = true

script 2:

while wait(0.5) do
  if _G.Activate == true then
    warn('EZ!')
  end
end

this can be done in server and local scripts

5 comments

0

Thanks!

0

No problem.

0

Does this work with like if you go from a local script to a regular script?

0

Should do. Also if this works, mark it as the answer so people don't keep replying.

0

Done.

This discussion is preserved as it was. New answers, comments, and votes are closed.