Skip to main content

getMechanismParts

Gets the full mechanism from parts. See NoCollisionConstraintUtils.

Functions

getMechanismParts

getMechanismParts.getMechanismParts(originParts{BasePart}) → {BasePart}

Gets all parts in a mechanisms. A mechanism in Roblox is anything connected by joints, constraints, and are all owned by network ownership.

info

Calling this class can be quite expensive.

print(getMechanismParts({ workspace.Part })) --> "Part", "Blah"

See: https://devforum.roblox.com/t/getting-all-parts-in-a-mechanism-one-part-in-each-assembly/101344/4

Show raw api
{
    "functions": [
        {
            "name": "getMechanismParts",
            "desc": "Gets all parts in a mechanisms. A mechanism in Roblox is anything connected by joints,\nconstraints, and are all owned by network ownership.\n\n:::info\nCalling this class can be quite expensive.\n:::\n\n```lua\nprint(getMechanismParts({ workspace.Part })) --> \"Part\", \"Blah\"\n```\nSee: https://devforum.roblox.com/t/getting-all-parts-in-a-mechanism-one-part-in-each-assembly/101344/4",
            "params": [
                {
                    "name": "originParts",
                    "desc": "",
                    "lua_type": "{ BasePart }"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "{ BasePart }"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 32,
                "path": "src/getmechanismparts/src/Shared/getMechanismParts.lua"
            }
        }
    ],
    "properties": [],
    "types": [],
    "name": "getMechanismParts",
    "desc": "Gets the full mechanism from parts. See [NoCollisionConstraintUtils].",
    "source": {
        "line": 5,
        "path": "src/getmechanismparts/src/Shared/getMechanismParts.lua"
    }
}