Skip to main content

instanceTroveUtil

An utility module for working with instance troves.

Functions

instanceTrove

instanceTroveUtil.instanceTrove(instanceInstance) → Trove

Returns the given instance's trove. If one does not exist, it'll be created for the given instance. This trove will be automatically cleaned up once instance is destroyed.

WARNING

This method will throw an error if instance is not present in game.

Show raw api
{
    "functions": [
        {
            "name": "instanceTrove",
            "desc": "Returns the given `instance`'s trove. If one does not exist, it'll be created for the given `instance`. \nThis trove will be automatically cleaned up once `instance` is destroyed.\n\n:::warning \nThis method will throw an error if `instance` is not present in game.\n:::",
            "params": [
                {
                    "name": "instance",
                    "desc": "",
                    "lua_type": "Instance"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Trove"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 23,
                "path": "src/instanceTroveUtil/init.luau"
            }
        }
    ],
    "properties": [],
    "types": [],
    "name": "instanceTroveUtil",
    "desc": " \n\nAn utility module for working with instance troves.",
    "source": {
        "line": 6,
        "path": "src/instanceTroveUtil/init.luau"
    }
}