> ## Documentation Index
> Fetch the complete documentation index at: https://docs.projectreal.gg/llms.txt
> Use this file to discover all available pages before exploring further.

# getinstancesbyclass

> Возвращает instances из Instance cache table, у которых ClassName field точно совпадает с запрошенным string. Первый аргумент читается через string type checking. Empty string вызывает "ClassName required". Function создает новую array table, итерирует cache, сохраненную под Instance cache, оставляет только values, чей Lua type является object, читает ClassName field каждого object value и сравнивает его через strcmp с запрошенным className. Matches вставляются sequential, начиная с index 1. Совпадение exact и case-sensitive. Function не использует IsA, не включает subclasses, не делает walk descendants, не фильтрует по Parent и не сортирует result. getinstancesofclass является alias той же function.

<div className="real-function-page">
  ```lua theme={null}
  getinstancesbyclass(className: string): table
  ```

  ## Алиасы

  * `getinstancesofclass`

  ## Аргументы

  <ParamField path={"className"} type={"string"} required>
    Exact ClassName string для совпадения. Empty strings вызывают "ClassName required".
  </ParamField>

  ## Возвраты

  <ResponseField name={"instances"} type={"table"}>
    New array table, содержащая matching object values из Instance cache table.
  </ResponseField>
</div>
