When Rojo creates an instance from a file — say, aDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/rojo-rbx/rojo/llms.txt
Use this file to discover all available pages before exploring further.
ModuleScript from a .luau file — it has no way to know about properties you might want to set on that instance beyond the content of the file itself. Meta files solve this problem. They are small JSON sidecar files that let you declare properties, attributes, a class name override, and other instance metadata alongside the source file.
Meta files never create instances on their own. They only attach extra configuration to an instance that already exists due to a matching source file or directory.
Both
.meta.json and .meta.jsonc variants are supported. The .jsonc variant allows JavaScript-style comments and trailing commas.Two kinds of meta files
Adjacent meta files
An adjacent meta file sits next to a source file and shares its base name. It applies to the single instance that the source file produces.<basename>.meta.json, where <basename> is the full name of the source file minus its extension. For PlayerData.luau, the meta file is PlayerData.meta.json.
Directory meta files
A directory meta file is namedinit.meta.json and lives inside a directory. It applies to the instance that the directory itself becomes — typically a Folder.
Fields
Both adjacent and directory meta files share most fields.className is only valid in directory meta files.
(Directory meta files only.) Override the Roblox class of the directory instance. The directory must currently resolve to a
Folder — you cannot change the class of a directory that contains an init script, for example.A map of property names to values applied to the instance. Rojo resolves each value against the instance’s class using the reflection database. You can supply bare Lua-compatible values when the type is unambiguous, or use explicit type tags when you need precision.
A map of attribute names to values. Attributes are freeform key-value pairs stored on an instance and accessible from scripts via
instance:GetAttribute().Controls whether Rojo leaves unknown child instances alone during live sync. When
true, instances that are not tracked by Rojo are preserved rather than removed. Equivalent to $ignoreUnknownInstances in the project file.A stable identifier for this instance used to resolve referent properties from other instances. Matches the
$id field in the project file format.Examples
Disable a script without editing source
PlayerData.meta.json
Set attributes on a module
Config.meta.json
Change a directory’s class
A folder that holds configuration objects can become aConfiguration instance:
Settings/init.meta.json
Preserve runtime children
If a directory has children added at runtime (by a server script, for example), tell Rojo to leave them alone:ServerStorage/init.meta.json
Combine properties and attributes
ReplicatedStorage/GameData.meta.jsonc
Property value format
Meta file properties use the same unresolved value format as$properties in project files. For most property types, you can supply a plain JSON value and Rojo infers the correct Roblox type from the class’s reflection data:
Rojo merges meta file properties with any properties already set by the source file. Properties defined in the meta file take precedence.
