Snapshot and diff
snapshotSave game instance state in a named slot, then compare it later to list added, removed, and changed properties around an action.
Instructions
Save the state of part of the game and later see exactly what changed. action take records the instances under a path (names, classes and the properties that matter for each class, or the ones you list) in a named slot; action diff compares the slot with the game as it is now and lists what was added, removed and changed (property, before, after); action list shows the slots; action delete removes one. Use it around an action: take, let the user do something or trigger it with gui_interact, then diff. Snapshots live in the executor's memory, at most 10 slots, and are gone when the game is left. Requires the connected state.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| keep | No | diff: replace the saved slot with the current state afterwards, so the next diff starts from here. | |
| name | No | Slot name (default 'default'). | |
| path | No | take: dotted path of the root (default game.Workspace). | |
| depth | No | take: how many levels below the root to record (default 4). | |
| limit | No | diff: entries per list (default 50). | |
| action | No | take (default), diff, list or delete. | |
| client | No | Client id from list_clients, for example c2. Defaults to the client that connected last. | |
| properties | No | take: property names to record for every instance. Default: a sensible set for each class (Position, Size, Anchored, Text, Value, Health and so on). | |
| max_instances | No | take: stop after this many instances (default 1500). |