Is it possible to write an array into a variable, and then use it in different scripts? For example, I have an array that I want to write into a variable (Text, Number, Int, I do not know what to use), and then apply it in another script.

3 comments

0

Remote functions could do the trick

0

You can use a BindableEvent instance to share data between scripts. One script will fire the event with the data, and the other can listen for it with :Connect(). http://wiki.roblox.com/index.php?title=API:Class/BindableEvent

0

Typically an array is assigned as a variable. Although you can turn the array directly into a string using JSON, (ref 1) as for sharing it between different scripts. You can easily do that with Bindable Events as pointed out by duckwit. Note that this only works between Server communication and would instead require Remote Events to communicate with the Client (ref 2). (1) http://wiki.roblox.com