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 Type | Example Property | Build | Live Sync | Project Files |
---|---|---|---|---|
Attributes | Instance.Attributes | ✔ | ✔ | ✔ |
Axes | ArcHandles.Axes | ✔ | ✔ | ✔ |
BinaryString | BinaryStringValue.Value | ✔ | ❌ | ✔ |
Bool | Part.Anchored | ✔ | ✔ | ✔ |
BrickColor | Part.BrickColor | ✔ | ✔ | ✔ |
CFrame | Camera.CFrame | ✔ | ✔ | ✔ |
Color3 | Lighting.Ambient | ✔ | ✔ | ✔ |
Color3uint8 | Part.BrickColor | ✔ | ✔ | ✔ |
ColorSequence | Beam.Color | ✔ | ✔ | ✔ |
Content | Decal.Texture | ✔ | ✔ | ✔ |
Enum | Part.Shape | ✔ | ✔ | ✔ |
Faces | Handles.Faces | ✔ | ✔ | ✔ |
Float32 | Players.RespawnTime | ✔ | ✔ | ✔ |
Float64 | Sound.PlaybackLoudness | ✔ | ✔ | ✔ |
Font | TextLabel.FontFace | ✔ | ✔ | ✔ |
Int32 | Frame.ZIndex | ✔ | ✔ | ✔ |
Int64 | Player.UserId | ✔ | ✔ | ✔ |
MaterialColors | Terrain.MaterialColors | ✔ | ✔ | ✔ |
NumberRange | ParticleEmitter.Lifetime | ✔ | ✔ | ✔ |
NumberSequence | Beam.Transparency | ✔ | ✔ | ✔ |
OptionalCoordinateFrame | Model.WorldPivotData | ✔ | ❌ | ✔ |
PhysicalProperties | Part.CustomPhysicalProperties | ✔ | ✔ | ✔ |
ProtectedString | ModuleScript.Source | ✔ | ✔ | ✔ |
Ray | RayValue.Value | ✔ | ✔ | ✔ |
Rect | ImageButton.SliceCenter | ✔ | ✔ | ✔ |
Ref | Model.PrimaryPart | ✔ | ✔ | ❌ |
Region3 | N/A | ✔ | ✔ | ❌ |
Region3int16 | Terrain.MaxExtents | ✔ | ✔ | ❌ |
SharedString | N/A | ✔ | ✔ | ❌ |
String | Instance.Name | ✔ | ✔ | ✔ |
Tags | Instance.Tags | ✔ | ✔ | ✔ |
UDim | UIListLayout.Padding | ✔ | ✔ | ✔ |
UDim2 | Frame.Size | ✔ | ✔ | ✔ |
Vector2 | ImageLabel.ImageRectSize | ✔ | ✔ | ✔ |
Vector2int16 | N/A | ✔ | ✔ | ✔ |
Vector3 | Part.Size | ✔ | ✔ | ✔ |
Vector3int16 | TerrainRegion.ExtentsMax | ✔ | ✔ | ✔ |
QDir | Studio.Auto-Save Path | ❌ | ❌ | ❌ |
QFont | Studio.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:
- Bool
- BrickColor
- CFrame
- Color3
- ColorSequence
- Float64
- Font
- NumberRange
- NumberSequence
- Rect
- String
- UDim
- UDim2
- Vector2
- Vector3
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}
}
}
MaterialColors
For both implicit and explicit values, the type is an object that looks like this:
{
"$properties": {
"ImplicitExample": {
"Grass": [10, 20, 30],
"Asphalt": [40, 50, 60],
"LeafyGrass": [255, 155, 55]
},
"ExplicitExample": {
"MaterialColors": {
"Grass": [10, 20, 30],
"Asphalt": [40, 50, 60],
"LeafyGrass": [255, 155, 55]
}
}
}
}
The key-value pairs within the object should be Material enum items mapped to arrays of 3 integers representing the RGB of the specified color. Only the values you wish to change the defaults of need to be specified.
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]}
}
}