Introducing UnreliableRemoteEvents

If you are only using ASCII characters each character equals 1 byte plus a couple of bytes of overhead depending on the length of the string (2 bytes if the string length is less than 2^7 = 128 characters long, 3 bytes for strings that are between that and 2^14 = 16384 characters long, etc. )

As for other common data types,

  • Numbers use up 9 bytes (8 bytes + 1 byte overhead)

  • Arrays like strings have an overhead depending on their length (2 bytes if it has less than 128, 3 for less than 16384, etc.)

  • nil uses up 1 byte

  • Vector3’s use up 13 bytes (4 bytes * 3 + 1 byte of overhead)

  • CFrames use up to 20 bytes

  • References to instances use up 6 bytes

  • booleans (true and false) use up 2 bytes

The exact maximum amount of data you are currently able to send at once is 908 bytes so for example

UnreliableRemoteEvent:Fire(string.rep("i",905)) --908 bytes payload

…will work whereas

UnreliableRemoteEvent:Fire(string.rep("i",906)) --909 bytes payload

will cause an error due to being 1 byte too long.

14 Likes