saveinstance
Writes a partial Instance-tree export to an RBXMX file.
The output name receives a .rbxmx suffix. This is a partial serializer: it writes a fixed property whitelist with string, boolean, number and EnumItem values, and visits at most 20,000 instances. It does not provide a full place backup, script-source export, complete reference reconstruction or all Roblox property types.
saveinstance(target: Instance, options: table?): stringParameters
| Parameter | Type | Description |
|---|---|---|
target | Instance | Root Instance to serialize. |
options | table? | FileName or filename selects the output name; defaults to target.Name. |
Example
local folder = Instance.new("Folder")
folder.Name = "ExampleExport"
local path = saveinstance(folder, { FileName = "example-export" })
print(path)
folder:Destroy()Example output
C:\Users\<you>\AppData\Roaming\Acedia\workspace\example-export.rbxmThe exact prefix is the configured workspace root; the file extension is .rbxm for a single instance and .rbxmx when a container with multiple children is written as XML.
Errors: The root must be an Instance and FileName must be a non-empty string. Workspace write restrictions apply.
