Hi there, I'm working on a train system that has a custom route setting and so far I've got it to the stage where the player can select which route they want to take and it adds them to a table however I need to somehow access the table from another local script in order for it to change the tracks so that the train can follow its route. Is this possible or do I need to try make them into 1 script? Thanks :)
TL;DR - Can a table made in a local script be accessed by another local script without anything other than just making the script or do I need to try make it into 1 single script?
Currently the table is named "Stations"

8 comments
The table will not be available to the local script of a completely different client; however through ModuleScripts and bindables you could do for the same client.
yes, you can use _G , shared, and module scripts
But that's unrecommended; it gets messy.
Would it be accessable to the same client as the one that the table created on? If so how would I define the table? Would it just be something like "local table = Stations" or something? Thanks
As I said, use modules and/or bindables.
you define a table with a set of squiggly brackets like : local tbl = {143,564,632}
Ok thank you
You can use remote events to send data to other clients. You can use bindable events to access other scripts on the same client that fired them.