Skip to content

JSON Models

JSON Models describe a simple set of Instances.

Unlike Model Files (RBXM/RBXMX;) their data is limited to that which can be assigned by a script (e.g., no MeshPart data.)

Syntax

File Name

  • *.Model.JSON

Keys

  • name: string (Optional)
  • className: string (Optional)
  • properties: {[string]: any} (Optional)
    • Functions as instance[property] = value.
  • attributes: {[string]: any} (Optional)
    • Functions as instance:SetAttribute(attribute, value).
  • tags: {string} (Optional)
    • Functions as CollectionService:AddTag(instance, tag)
  • children: {Instance} (Optional)

Example

A JSON Model describing a Model containing a small green Part and a RemoteEvent would be written as a file named {example}.Model.JSON with:

json
{
    "name": "Money",
	"className": "Model",
	"children": [
		{
			"className": "Part",
			"properties": {
				"BrickColor": [ "BrickColor.new(\"Bright green\")" ],
				"Size": [ "Vector3.new(1, 0.4, 2)" ]
			}
		},
		{
			"name": "CollectMoney",
			"className": "RemoteEvent"
		}
	]
}

Lync and Pronghorn released under LGPL 2.1