roblox studio access variables from another script code example Example: roblox global variables --Script 1: _G.foo = 'bar' --Script 2: print(_G.foo)