Query DescendantsRoblox✎
Every descendant matching a selector string, as { Instance }. ClassName matches by IsA, .Tag by CollectionService tag, #Name by name, [Property = value] and [$Attribute = value] by value; combine them, and use :not(...) for absence. Pair with Cast Array when you know what comes back.
Pending review
- needs the Roblox engine — its datatypes, its DataModel or its scheduler
- pure — no execution pins, wire it anywhere
- names its result — Result name in the Inspector is the local it binds, and a Declare Local reading that result makes a second one: see Variables and locals
Inputs
- Instance:Instancemust be wired
- Selector:string=
"MeshPart"
Outputs
- result:table
What it compiles to
luau
print(instance:QueryDescendants("MeshPart"))
Not reviewed yet