Call pack
to convert data into a string. pack
expects a table, so wrap your value(s) around a table if necessary.
roblox_pack.pack(data: {any}) -> string
roblox_pack.unpack(packed: string) -> {any}
local roblox_pack = require(game.ReplicatedStorage:WaitForChild("roblox_pack"))
local data = {Vector2.zero, Vector3.zero, Vector2.new(0, 10)}
local packed = roblox_pack.pack(data)
print(packed)
local unpacked = roblox_pack.unpack(packed)
print(unpacked)
- nil
- boolean
- number
- string
- table
- Axes
- BrickColor
- CatalogSearchParams
- CFrame
- Color3
- ColorSequence
- ColorSequenceKeypoint
- DateTime
- DockWidgetPluginGuiInfo - properties are read only
- Enum
- EnumItem
- Faces
- FloatCurveKey
- Font
- Instance - NOTE: Instances get converted to and from paths
- NumberRange
- NumberSequence
- NumberSequenceKeypoint
- OverlapParams
- Path2DControlPoint - TODO
- PathWaypoint
- PhysicalProperties
- Random - no way to transfer internal state besides seed
- Ray
- RaycastParams
- RaycastResult - not constructable
- RBXScriptConnection - not constructable
- RBXScriptSignal - not constructable
- Rect
- Region3 - TODO
- Region3int16 - TODO
- RotationCurveKey
- Secret - Not applicable
- SharedTable - TODO
- TweenInfo
- UDim
- UDim2
- Vector2
- Vector2int16
- Vector3
- Vector3int16