Yuari
Documentation
Docs/Instances/getinstances

getinstances

Returns live instances, optionally filtered by class.

Syntax

getinstances(className?: string) -> table

Parameters

ParameterTypeDescription
className?stringThe Roblox class name to match.

Returns

TypeDescription
tableLive instances, optionally filtered by class

Description

getinstances is part of the Instances library. Instance helpers traverse the live DataModel and return instance proxies tied to the current game session.

The call is read-only: it resolves the current value when invoked and does not change the underlying state.

Example

for _, part in ipairs(getinstances("Part")) do
    print(part)
end

Notes

  • Returned instances are live proxies; they can become invalid if the object is destroyed.