Print the instance tree
get_hierarchyPrints an instance tree under a Roblox path as an indented name-and-class outline to explore game structure, limit depth or node counts, or filter branches by class.
Instructions
Print the instance tree under a path as an indented outline (name and class per line), like the Explorer panel. Use it to get to know a game quickly. Limit it with depth (default 3), max_nodes and max_children, or show only the branches that lead to a class with class_name. Requires the connected state.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| root | No | Dotted path to start at (default game). | |
| depth | No | How many levels to show (default 3). | |
| client | No | Client id from list_clients, for example c2. Defaults to the client that connected last. | |
| max_nodes | No | Stop after this many lines (default 300). | |
| class_name | No | Only show branches that contain an instance of this class (base classes included). | |
| max_children | No | Show at most this many children per node (default 40). |