Instances

getnilinstances

Returns instances that are parented to nil but still reachable by the runtime.

Syntax

getnilinstances(): table

Returns

NameTypeDescription
instancestableArray table of matching instances.

Description

Returns instances that are parented to nil but still reachable by the runtime.

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 = getnilinstances()
print(result)