ReferenceInstances

getdescendants

Returns an Instance's descendants. It calls object:GetDescendants().

Syntax

getdescendants(object: Instance) -> {Instance}

Parameters

ParameterTypeDescription
objectInstanceThe root.

Returns

TypeDescription
{Instance}Every descendant of the object.

Example

print(#getdescendants(workspace))

These are Game executor contracts. Check build requirements and session lifetimes before using them.