Instances

getinstances

Returns all currently reachable Roblox instances.

Syntax

getinstances(): table

Returns

NameTypeDescription
instancestableArray table of matching instances.

Description

Returns all currently reachable Roblox instances.

Call it without parameters. The function reads the needed context from the current runtime state.

It returns instances (table). Use the returns table to separate successful values from nil results and recoverable errors.

Example

Example call with placeholder values.

local result = getinstances()
print(result)