Skip to main content

CollectionServiceUtils

Utility functions for use with collection service tags

Functions

findFirstAncestor

CollectionServiceUtils.findFirstAncestor(
tagNamestring,
childInstance
) → Instance?

Finds the first ancestor with the given tagName.

findInstanceOrFirstAncestor

CollectionServiceUtils.findInstanceOrFirstAncestor(
tagNamestring,
childInstance
) → Instance?

Finds the child with the tag name, or the first ancestor with the given tagName.

removeAllTags

CollectionServiceUtils.removeAllTags(instanceInstance) → ()

Removes all tags from an instance.

Show raw api
{
    "functions": [
        {
            "name": "findFirstAncestor",
            "desc": "Finds the first ancestor with the given tagName.",
            "params": [
                {
                    "name": "tagName",
                    "desc": "",
                    "lua_type": "string"
                },
                {
                    "name": "child",
                    "desc": "",
                    "lua_type": "Instance"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Instance?"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 16,
                "path": "src/collectionserviceutils/src/Shared/CollectionServiceUtils.lua"
            }
        },
        {
            "name": "findInstanceOrFirstAncestor",
            "desc": "Finds the child with the tag name, or the first ancestor with the given tagName.",
            "params": [
                {
                    "name": "tagName",
                    "desc": "",
                    "lua_type": "string"
                },
                {
                    "name": "child",
                    "desc": "",
                    "lua_type": "Instance"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Instance?"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 37,
                "path": "src/collectionserviceutils/src/Shared/CollectionServiceUtils.lua"
            }
        },
        {
            "name": "removeAllTags",
            "desc": "Removes all tags from an instance.",
            "params": [
                {
                    "name": "instance",
                    "desc": "",
                    "lua_type": "Instance"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 52,
                "path": "src/collectionserviceutils/src/Shared/CollectionServiceUtils.lua"
            }
        }
    ],
    "properties": [],
    "types": [],
    "name": "CollectionServiceUtils",
    "desc": "Utility functions for use with collection service tags",
    "source": {
        "line": 5,
        "path": "src/collectionserviceutils/src/Shared/CollectionServiceUtils.lua"
    }
}