getinstances

Lists live instance wrappers.

Syntax

Signature
getinstances(Class: string?) -> {Instance}

Aliases

This function has no aliases.

Parameters

ParameterTypeDescription
Classstring?Exact class name filter. Omit to include all recognized classes.

Returns

TypeDescription
{Instance}One-based list of matching live wrappers.

Notes

Searches the current VM for live instance wrapper tables with a recognized ClassName and a string Name. Class optionally filters by an exact class name. This enumerates available wrappers rather than creating wrappers for every world object.

Example

Luau
local Result = getinstances()
print(Result)