> ## Documentation Index
> Fetch the complete documentation index at: https://docsuncv2.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# saveinstance

Saves the current place or specific instances to the workspace as a file.

```luau theme={null}
saveinstance(options: table?): ()
```

## Parameters

| Parameter | Type    | Description                                                                                     |
| --------- | ------- | ----------------------------------------------------------------------------------------------- |
| `options` | `table` | *(Optional)* A table of configuration options (e.g. `{mode = "optimized", noscripts = false}`). |

## Returns

`void`

## Example

<CodeGroup>
  ```luau Example 1 theme={null}
  saveinstance() -- Saves the entire place
  ```

  ```luau Example 2 theme={null}
  saveinstance({ mode = "optimized", noscripts = true })
  ```
</CodeGroup>

<Tip>
  Generates a .rbxl file in the executor's workspace directory containing the game structure.
</Tip>
