buffer supports directly. Each writes exactly its
declared size, with no tag byte and no narrowing.
Unsigned integers
Type<number>
One byte. Range
0 to 255.Type<number>
Two bytes. Range
0 to 65,535.Type<number>
Four bytes. Range
0 to 4,294,967,295.Signed integers
Type<number>
One byte. Range
-128 to 127.Type<number>
Two bytes. Range
-32,768 to 32,767.Type<number>
Four bytes. Range
-2,147,483,648 to 2,147,483,647.T.Int8() is the only width the dynamic encoder never selects on its own, because small
negative numbers fall through to i16 there. Declaring it in a schema is the only way to
get one-byte signed values.Floats
Type<number>
Four bytes. Roughly 7 significant decimal digits.
Type<number>
Eight bytes. Full Luau
number precision, lossless.Overflow and truncation
Choosing a width
A
UInt32 maxes out at about 4.29 billion, which is enough for os.time() until 2106 but
not for millisecond timestamps or Roblox user ids in the far future. Use T.Float64() when
you need range beyond 2^32.Next steps
Primitives
Bool, String and Any.Roblox datatypes
Vectors, CFrames, instances and enums.
