Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/nnaridz/RbxGenie/llms.txt

Use this file to discover all available pages before exploring further.

All Roblox datatypes use tagged JSON objects when passed to RbxGenie tools. This allows the HTTP API to represent complex types like Vector3, CFrame, and Color3 in a serializable format.

Primitive Types

Primitive types are passed as-is:
"hello"       // string
42            // number
true          // boolean

Vector Types

Vector3

{
  "type": "Vector3",
  "value": [x, y, z]
}
Example:
{
  "type": "Vector3",
  "value": [10, 5, 0]
}

Vector2

{
  "type": "Vector2",
  "value": [x, y]
}

Color Types

Color3

RGB values from 0 to 1:
{
  "type": "Color3",
  "value": [r, g, b]
}
Example (bright red):
{
  "type": "Color3",
  "value": [1, 0, 0]
}

BrickColor

{
  "type": "BrickColor",
  "value": "Bright red"
}

CFrame

CFrame uses a 12-component array: position (x, y, z) + right vector (3) + up vector (3) + look vector (3):
{
  "type": "CFrame",
  "value": [x, y, z, r0, r1, r2, u0, u1, u2, l0, l1, l2]
}
Implementation from ValueSerializer.lua:72-78:
local c = v
return { type = "CFrame", value = {
  c.X, c.Y, c.Z,
  c.RightVector.X, c.RightVector.Y, c.RightVector.Z,
  c.UpVector.X, c.UpVector.Y, c.UpVector.Z,
  c.LookVector.X, c.LookVector.Y, c.LookVector.Z,
}}

UI Types

UDim2

Used for GUI sizing and positioning:
{
  "type": "UDim2",
  "value": [xScale, xOffset, yScale, yOffset]
}
Example (50% width + 100px, 25% height + 50px):
{
  "type": "UDim2",
  "value": [0.5, 100, 0.25, 50]
}

UDim

{
  "type": "UDim",
  "value": [scale, offset]
}

Enum Types

Enums are passed as their full string representation:
{
  "type": "Enum",
  "value": "Enum.Material.Grass"
}
Common examples:
  • "Enum.Material.Grass"
  • "Enum.PartType.Ball"
  • "Enum.FormFactor.Symmetric"
Implementation from ValueSerializer.lua:7-13:
local function toEnum(str: string): EnumItem?
  local parts = str:split(".")
  if #parts < 3 then return nil end
  local enumType: any = Enum[parts[2]]
  if not enumType then return nil end
  return enumType[parts[3]]
end

Range Types

NumberRange

{
  "type": "NumberRange",
  "value": [min, max]
}

Rect

{
  "type": "Rect",
  "value": [minX, minY, maxX, maxY]
}

Sequence Types

NumberSequence

Array of keypoints [time, value, envelope]:
{
  "type": "NumberSequence",
  "value": [
    [0, 1, 0],
    [0.5, 0.5, 0],
    [1, 0, 0]
  ]
}
Implementation from ValueSerializer.lua:87-92:
local kps = {}
for _, kp in ipairs(v.Keypoints) do
  table.insert(kps, { kp.Time, kp.Value, kp.Envelope })
end
return { type = "NumberSequence", value = kps }

ColorSequence

Array of keypoints [time, r, g, b]:
{
  "type": "ColorSequence",
  "value": [
    [0, 1, 0, 0],
    [1, 0, 0, 1]
  ]
}

Usage in Tools

All property-setting tools accept these encoded values:

set_property

{
  "path": "Workspace.Part",
  "property": "Position",
  "value": {
    "type": "Vector3",
    "value": [10, 5, 0]
  }
}

create_object_with_properties

{
  "path": "StarterGui",
  "className": "ScreenGui",
  "properties": {
    "Name": "MyGui",
    "ResetOnSpawn": false
  }
}

set_relative_property

Add a delta to the current value:
{
  "path": "Workspace.Part",
  "property": "Position",
  "delta": {
    "type": "Vector3",
    "value": [0, 5, 0]
  }
}
Implementation from PropertyTools.lua:84-100:
local delta = ValueSerializer.fromJSON(args.delta)
local newVal
local dt = typeof(currentVal)

if dt == "number" then
  newVal = currentVal + (delta :: number)
elseif dt == "Vector3" then
  newVal = (currentVal :: Vector3) + (delta :: Vector3)
elseif dt == "Vector2" then
  newVal = (currentVal :: Vector2) + (delta :: Vector2)
elseif dt == "UDim2" then
  newVal = (currentVal :: UDim2) + (delta :: UDim2)
elseif dt == "CFrame" then
  newVal = (currentVal :: CFrame) * (delta :: CFrame)
end

Source Reference

All encoding/decoding is handled by ValueSerializer.lua in the RbxGenie plugin. The serializer automatically converts between JSON-friendly formats and Roblox native types.