I've been working on a game all year on Roblox. I've just finished the server-side of it, which holds all the data, and now I'm working on the client side, downloading and displaying the data.
So it came as a real bummer that I can't just pass a table in it's entirety through a RemoteEvent or RemoteFunction to download the data from the server to client. All the metatables I worked hard on are gone, and the class structure I've been developing gets ruined.
However, you can pass simple tables that hold data across the client-server boundary. At an arbitrary level, everything my tables hold are compromised of these simple pieces of data (strings, numbers, etc.). They are all named by keys too.
Because of this, isn't it possible to conserve a table using a pack/unpack script?
A pack script could transfer the table's data alone, and put it's metatables also as pieces of data inside of the table (and not applied to the table). The unpack function reverses this proccess.
The process could be recursive if there are tables stored within tables for this scenario.
So, is this a good way to work around the system, or am I missing something?
Yes, a serialize/deserialize system is an approach that would work. This is how it'd done in "real" systems, too.
This answer concerns this.
It is impossible to send functions over the network (because of closures). It's difficult to send cyclic structures. As a result, you're limited to sending trees/lists of plain old data, like numbers, strings, and booleans.
You can tag this structure with the "type" of object it is, and the receiving end can turn this data back into the object you want.
I think, however, most of the time you don't really need to send objects with behavior over the network.
Messages are messages, they're simply informing you about information that has happened. Information doesn't usually need behavior.
It may be most appropriate as the argument to a constructor/factory of something that does have behavior.
Try sending the table parsed as JSON using HttpService's JSONEncode.