Data limitation for server sending client all their pets?

Hi, so I’m working on a pet system. As of now, it’s entirely embedded in tables and such; there’s no physical ValueObjects representing equipped pets or any of that.

For readonly purposes, to display all the client’s pets on their screen, I use a RemoteFunction and call :InvokeServer() to get the server to return the list of their pets.

I was just wondering about this though. Is there any data limit for the server sending data back to the client? Each player could potentially have a decent number of pets, although the data structure that makes up a pet table is fairly small. (right now it’s just a table with several fields such as the ID for that pet and its name.)

Any feedback is appreciated, thanks. :slight_smile:

Remote events/ functions relay information internally with strings (similarly to datastores). So any tables are encoded to and from JSON formatted strings. This prevents mixed tables, since JSON prioritizes an array if a table has any number indexes. Metatables are also lost in the transaction.

I’ve never heard of a data limit though. After a quick test, there does seem to be a limit due to some internal functions which simply can’t process it. But it’s good to note, this will occur in no realistic implementation.

SendData: bitStream string write: String too long
Error while processing packet: readFast past end for uint32_t
1 Like