Skip to main content
Version: v7

Properties

This page is a work in progress. It may not be complete or accurate yet.

Rojo supports most Roblox properties. This page documents all of the properties that Rojo supports, as well as their syntax when written in project files.

Property Type Support

Property TypeExample PropertyBuildLive SyncProject Files
AttributesInstance.Attributes
AxesArcHandles.Axes
BinaryStringTerrain.MaterialColors
BoolPart.Anchored
BrickColorPart.BrickColor
CFrameCamera.CFrame
Color3Lighting.Ambient
Color3uint8Part.BrickColor
ColorSequenceBeam.Color
ContentDecal.Texture
EnumPart.Shape
FacesHandles.Faces
Float32Players.RespawnTime
Float64Sound.PlaybackLoudness
FontTextLabel.FontFace
Int32Frame.ZIndex
Int64Player.UserId
NumberRangeParticleEmitter.Lifetime
NumberSequenceBeam.Transparency
OptionalCoordinateFrameModel.WorldPivotData
PhysicalPropertiesPart.CustomPhysicalProperties
ProtectedStringModuleScript.Source
RayRayValue.Value
RectImageButton.SliceCenter
RefModel.PrimaryPart
Region3N/A
Region3int16Terrain.MaxExtents
SharedStringN/A
StringInstance.Name
TagsInstance.Tags
UDimUIListLayout.Padding
UDim2Frame.Size
Vector2ImageLabel.ImageRectSize
Vector2int16N/A
Vector3Part.Size
Vector3int16TerrainRegion.ExtentsMax
QDirStudio.Auto-Save Path
QFontStudio.Font

Properties in Project Files

Many types have an implicit and explicit format. The Project format page decribes these formats in more detail.

Attributes

Rojo defines the "Attributes" property on any instance to have the Attributes type, allowing it to be specified implicitly.

For both implicit and explicit values, the format is an object where each field represents an attribute, where the key is the name of the attribute, and the value must be an explicit value.

{
"$properties": {
"Attributes": {
"Foo": {"Bool": true},
"Bar": {"Vector3": [1.0, 2.0, 3.0]},
},
"AttributesSerialized": {
"Attributes": {
"Foo": {"Bool": true},
"Bar": {"Vector3": [1.0, 2.0, 3.0]},
}
}
}
}

The following types are supported for attribute values:

Axes

The Axes type cannot be specified implicitly. For explicit values, the format is a list of strings, each of which may be either "X", "Y", or "Z". Each string sets the corresponding component.

{
"$properties": {
"ExplicitExample1": {"Axes": ["X", "Y", "Z"]},
"ExplicitExample2": {"Axes": ["X", "Z"]},
"ExplicitExample3": {"Axes": []}
}
}

BinaryString

The BinaryString type cannot be specified implicitly. For explicit values, the format is a base64-encoded string.

{
"$properties": {
"ExplicitExample": {"BinaryString": "SGVsbG8sIHdvcmxkIQ=="}
}
}

Bool

For both implicit and explicit values, the format is a boolean value.

{
"$properties": {
"ImplicitExample": true,
"ExplicitExample": {"Bool": false}
}
}

BrickColor

The BrickColor type cannot be specified implicitly. For explicit values, the format is an integer representing the Number of a BrickColor.

{
"$properties": {
"ExplicitExample": {"BrickColor": 194}
}
}

CFrame

For implicit values, the format is a flat list of components.

{
"$properties": {
"ImplicitExample": [
1.0, 2.0, 3.0,
4.0, 5.0, 6.0,
7.0, 8.0, 9.0,
10.0, 11.0, 12.0
]
}
}

For explicit values, the format is an object with position and orientation fields.

{
"$properties": {
"ExplicitExample": {
"CFrame": {
"position": [1.0, 2.0, 3.0],
"orientation": [
[4.0, 5.0, 6.0],
[7.0, 8.0, 9.0],
[10.0, 11.0, 12.0]
]
}
}
}
}

Color3

For both implicit and explicit values, the format is a list of R, G and B components, respectively. Each component is a float in the range [0, 1].

{
"$properties": {
"ImplicitExample": [
0.6392156862745098,
0.6352941176470588,
0.6470588235294118
],
"ExplicitExample": {
"Color3": [
0.6392156862745098,
0.6352941176470588,
0.6470588235294118
]
}
}
}

Color3uint8

The Color3uint8 type cannot be specified implicitly. For explicit values, the format is a list of R, G and B components, respectively. Each component is an integer in the range [0, 255].

{
"$properties": {
"ExplicitExample": {
"Color3uint8": [163, 162, 165]
}
}
}

ColorSequence

The ColorSequence type cannot be specified implicitly. For explicit values, the format is an object with a keypoints field, which is an array of ColorSequenceKeypoints. Each ColorSequenceKeypoint is an object with time and color fields. The color field is a Color3.

{
"$properties": {
"ExplicitExample": {
"ColorSequence": {
"keypoints": [
{
"time": 0.0,
"color": [1.0, 1.0, 0.5]
},
{
"time": 1.0,
"color": [0.0, 0.0, 0.0]
}
]
}
}
}
}

Content

For both implicit and explicit values, the format is a string.

{
"$properties": {
"ImplicitExample": "rbxassetid://12345",
"ExplicitExample": {"Content": "rbxassetid://12345"}
}
}

Enum

For implicit values, the format is a string corresponding to the name of the enum item. For example:

{
"$className": "SurfaceLight",
"$properties": {
"Face": "Front"
}
}

For explicit values, the format is an integer corresponding to the value of the enum item. For example:

{
"$className": "SurfaceLight",
"$properties": {
"Face": {
"Enum": 5
}
}
}

Faces

The Faces type cannot be specified implicitly. For explicit values, the format is a list of strings, each of which may be either "Right", "Top", "Back", "Left", "Bottom", or "Front". Each string sets the corresponding component.

{
"$properties": {
"ExplicitExample1": {"Faces": ["Right", "Top", "Back", "Left", "Bottom", "Front"]},
"ExplicitExample2": {"Faces": ["Right", "Top", "Front"]},
"ExplicitExample3": {"Faces": []}
}
}

Float32

For both implicit and explicit values, the format is a number.

{
"$properties": {
"ImplicitExample": 15.0,
"ExplicitExample": {"Float32": 15.0}
}
}

Float64

For both implicit and explicit values, the format is a number.

{
"$properties": {
"ImplicitExample": 15123.0,
"ExplicitExample": {"Float64": 15123.0}
}
}

Font

For both implicit and explicit values, the format is an object with family, weight, and style fields. Each component is a string.

{
"$properties": {
"ImplicitExample": {
"family": "rbxasset://fonts/families/LegacyArial.json",
"weight": "Regular",
"style": "Normal"
},
"ExplicitExample": {
"Font": {
"family": "rbxasset://fonts/families/LegacyArial.json",
"weight": "Regular",
"style": "Normal"
}
}
}
}

Int32

For both implicit and explicit values, the format is an integer.

{
"$properties": {
"ImplicitExample": 6014,
"ExplicitExample": {"Int32": 6014}
}
}

Int64

For both implicit and explicit values, the format is an integer.

{
"$properties": {
"ImplicitExample": 23491023,
"ExplicitExample": {"Int64": 23491023}
}
}

NumberRange

The NumberRange type cannot be specified implicitly. For explicit values, the format is a list of Min and Max components, respectively. Each component is a float.

{
"$properties": {
"ExplicitExample": {"NumberRange": [-36.0, 94.0]}
}
}

NumberSequence

The NumberSequence type cannot be specified implicitly. For explicit values, the format is an object with a keypoints field, which is an array of NumberSequenceKeypoints. Each ColorSequenceKeypoint is an object with time, value, and envelope fields.

{
"$properties": {
"ExplicitExample": {
"NumberSequence": {
"keypoints": [
{
"time": 0.0,
"value": 5.0,
"envelope": 2.0
},
{
"time": 1.0,
"value": 22.0,
"envelope": 0.0
}
]
}
}
}
}

OptionalCoordinateFrame

TODO

PhysicalProperties

The PhysicalProperties type cannot be specified implicitly. For explicit values, there are two formats.

The constant string "Default", which represents the default PhysicalProperties value.

{
"$properties": {
"ExplicitExample": {"PhysicalProperties": "Default"}
}
}

An object with fields corresponding to each component.

{
"$properties": {
"ExplicitExample": {
"PhysicalProperties": {
"density": 0.5,
"friction": 1.0,
"elasticity": 0.0,
"frictionWeight": 50.0,
"elasticityWeight": 25.0
}
}
}
}

ProtectedString

For both implicit and explicit values, the format is a string.

{
"$properties": {
"ImplicitExample": "print('Hello world!')",
"ExplicitExample": {"ProtectedString": "print('Hello world!')"}
}
}

Ray

The Ray type cannot be specified implicitly. For explicit values, there are several possible formats.

An object with origin and direction fields. Each component is a Vector3.

{
"$properties": {
"ExplicitExample": {
"Ray": {
"origin": [1.0, 2.0, 3.0],
"direction": [4.0, 5.0, 6.0]
}
}
}
}

A list of Origin and Direction components, respectively. Each component is a Vector3.

{
"$properties": {
"ExplicitExample": {
"Ray": [
[1.0, 2.0, 3.0],
[4.0, 5.0, 6.0]
]
}
}
}

Rect

The Rect type cannot be specified implicitly. For explicit values, the format is a list of Min and Max components, respectively. Each component is a Vector2.

{
"$properties": {
"ExplicitExample": {
"Rect": [
[0.0, 5.0],
[10.0, 15.0]
]
}
}
}

Ref

Not implemented.

Region3

Not implemented.

Region3int16

Not implemented.

SharedString

Not implemented.

String

For both implicit and explicit values, the format is a string.

{
"$properties": {
"ImplicitExample": "Hello, world!",
"ExplicitExample": {"String": "Hello, world!"}
}
}

Tags

For both implicit and explicit values, the format is a list of strings, where each string is a tag.

{
"$properties": {
"ImplicitExample": ["foo", "con'fusion?!", "bar"],
"ExplicitExample": {"Tags": ["foo", "con'fusion?!", "bar"]}
}
}

UDim

The UDim type cannot be specified implicitly. For explicit values, the format is a list of Scale and Offset components, respectively. Scale is a float, and Offset is an integer.

{
"$properties": {
"ExplicitExample": {"UDim": [1.0, 32]}
}
}

UDim2

The UDim2 type cannot be specified implicitly. For explicit values, the format is a list of X and Y components, respectively. Each component is a UDim.

{
"$properties": {
"ExplicitExample": {"UDim2": [[-1.0, 100], [1.0, -100]]}
}
}

Vector2

For both implicit and explicit values, the format is a list of X and Y components, respectively. Each component is a float.

{
"$properties": {
"ImplicitExample": [-50.0, 50.0],
"ExplicitExample": {"Vector2": [-50.0, 50.0]}
}
}

Vector2int16

For both implicit and explicit values, the format is a list of X and Y components, respectively. Each component is an integer.

{
"$properties": {
"ImplicitExample": [-300, 300],
"ExplicitExample": {"Vector2int16": [-300, 300]}
}
}

Vector3

For both implicit and explicit values, the format is a list of X, Y, and Z components, respectively. Each component is an float.

{
"$properties": {
"ImplicitExample": [-300.0, 0.0, 1500.0],
"ExplicitExample": {"Vector3": [-300.0, 0.0, 1500.0]}
}
}

Vector3int16

For both implicit and explicit values, the format is a list of X, Y, and Z components, respectively. Each component is an integer.

{
"$properties": {
"ImplicitExample": [60, 37, -450],
"ExplicitExample": {"Vector3int16": [60, 37, -450]}
}
}