If I needed to set a value of true or false, and that determined on what another script said the value was how would I go about doing so? For example, I click a GUI and a script sets a value for a variable from false to true, and I want another script to acknowledge that the value was changed from false to true.
Value objects
You know all those Instances which have 'Value' after their name? IntValue, StringValue, BoolValue, etc? You use those. If you want to find out when it is set, you can also make a connection to the Changed
event in order to get when it is changed and what it is changed to.
You could also use _G
, but I wouldn't suggest using it in this case as it will make more sense to you if you use a Value Instance.