Skip to main content

Instance

This item only works when running on the client. Client

A table of utility functions for working with Instances that can be used to speed up the process of writing repository scripts for client objects.

Functions

isPointer

Instance.isPointer(objectInstance?) → ()

Returns whether the object is a module pointer. Module pointers are used for things such as module-based object configurations to help reduce memory usage when requiring them.

getPointer

Instance.getPointer(objectInstance?) → Instance?

If the given object is a pointer, this function will return it's value. Otherwise, it will just return the object that was passed in.

Show raw api
{
    "functions": [
        {
            "name": "isPointer",
            "desc": "Returns whether the `object` is a module pointer. Module pointers are used\nfor things such as module-based object configurations to help reduce\nmemory usage when requiring them.",
            "params": [
                {
                    "name": "object",
                    "desc": "",
                    "lua_type": "Instance?"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 21,
                "path": "mirror/Kit.Utility.Instance.luau"
            }
        },
        {
            "name": "getPointer",
            "desc": "If the given `object` is a pointer, this function will return it's value.\nOtherwise, it will just return the object that was passed in.",
            "params": [
                {
                    "name": "object",
                    "desc": "",
                    "lua_type": "Instance?"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Instance?\n"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 31,
                "path": "mirror/Kit.Utility.Instance.luau"
            }
        }
    ],
    "properties": [],
    "types": [],
    "name": "Instance",
    "desc": "A table of utility functions for working with Instances that can be used to speed up the process of writing repository scripts for client objects.",
    "realm": [
        "Client"
    ],
    "source": {
        "line": 12,
        "path": "mirror/Kit.Utility.Instance.luau"
    }
}