Skip to main content

Get

Takes an Instance value followed by any number of strings that represent child Instance names and returns the final child. If the last argument is a table, it will return a tuple of the children specified by that table.

--- Single instance
local keystone = Get(workspace, "Arch", "Keystone")
--- Multiple children
local keystone, door = Get(workspace, "Arch", { "Keystone", "Door" })

Functions

Get

Get.Get(
initialObjectInstance,--

The object to start navigating from.

...string | {string}--

The names of the children to navigate through.

) → ...Instance--

A tuple of all the requested children at the final location.

Show raw api
{
    "functions": [
        {
            "name": "Get",
            "desc": "",
            "params": [
                {
                    "name": "initialObject",
                    "desc": "The object to start navigating from.",
                    "lua_type": "Instance"
                },
                {
                    "name": "...",
                    "desc": "The names of the children to navigate through.",
                    "lua_type": "string | {string}"
                }
            ],
            "returns": [
                {
                    "desc": "A tuple of all the requested children at the final location.",
                    "lua_type": "...Instance"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 30,
                "path": "src/shared/core/lib/Get.luau"
            }
        }
    ],
    "properties": [],
    "types": [],
    "name": "Get",
    "desc": "Takes an `Instance` value followed by any number of strings that represent\nchild `Instance` names and returns the final child. If the last argument is\na table, it will return a tuple of the children specified by that table.\n\n```lua\n--- Single instance\nlocal keystone = Get(workspace, \"Arch\", \"Keystone\")\n--- Multiple children\nlocal keystone, door = Get(workspace, \"Arch\", { \"Keystone\", \"Door\" })\n```",
    "source": {
        "line": 22,
        "path": "src/shared/core/lib/Get.luau"
    }
}