✓ Accepted answer
The difference will minimal - though you aren't sending the "Scraps =" and "Cash = " parts of the table (which are likely less than a dozen bytes total) in the second example, Roblox will have to send a little more data since you're sending two different events (though this might be as little as a single number).
So, if you're having bandwidth problems, choose the second one; otherwise you likely don't need to worry about that yet (if ever) and can choose whichever one is easier to work with in your scripts.
If you have a lot of data and are concerned about bandwidth, the best thing to do is to test it out. If Roblox really does cap everything at 50kb/s, send 100kb of data and see how many seconds it takes to get through compared to 50kb of data vs 25kb etc. If you find that it does not take a full one second longer to transmit 100kb compared to 50kb, that would imply that Roblox does not cap it at 50kb/s (and you could, if necessary, do further testing to determine the cap). In your case, if you wanted, you could try to test the difference between sending an event with no data, sending an event with a single number, and sending an event with a table.
However, if you're just sending a few numbers or strings along periodically, you're not even going to be sending 1kb of data at a time (in the worst case Roblox could use JSON encoding and so every character and digit would take up a byte plus say 1 more for various characters in the encoding, meaning sending 3 numbers from 0 to 1000 would take around 16 bytes at most), meaning you needn't worry about this.
1 comment
You should do the first one