I am attempting to have one script with a boolean variable determine if another script should run.
I seem to be having trouble getting the variable to transfer over though.
This is a basic summary of what I am trying to do. (Rather than throwing my entire block of code at you)
Script 1:
start = true
Script 2:
while true do while start do -- "start" is used here -- Blah blah blah, code here. (Nothing that affects "start") wait() end
Is this how I would use non-local variables inside other scripts?
All the scripts that use such things are running when I run my environment (I have a "while true" keeping them running in the background).
However, script 2 never goes through that second while loop.
Anyone have ideas?
Thanks
Say you have _G.Var = true
in the server-script 'apple' then you have another server-script called 'Bananas' you can access _G.Var
from Bananas since it is Global
In Apples
_G.Var = true
In Bananas
print(_G.Var)
Please upvote my answer if this helped.