Wait for an instance
wait_for_instanceWaits until a Roblox instance at a dotted path exists, optionally matching a class, and returns whether it was found or which path segment is missing after timeout.
Instructions
Wait until the instance at a dotted path exists (and optionally is of a class), for example after a teleport or while a map loads. Returns found true with the path, or found false with the segment that is still missing after the timeout. Requires the connected state.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Dotted path, starting at game. | |
| client | No | Client id from list_clients, for example c2. Defaults to the client that connected last. | |
| timeout | No | Seconds to wait (default 10). | |
| class_name | No | The instance must be of this class (IsA). |