> ## 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

> Tra ve instances tu Instance cache table co ClassName field khop chinh xac voi string duoc yeu cau. Doi so dau tien duoc doc bang string type checking. Empty string tao "ClassName required". Function tao mot array table moi, lap qua cache duoc luu duoi Instance cache, chi giu values co Lua type la object, doc ClassName field cua tung object value, va so sanh bang strcmp voi className duoc yeu cau. Matches duoc chen sequential bat dau tai index 1. Match la exact va case-sensitive. Function khong dung IsA, khong bao gom subclasses, khong walk descendants, khong filter theo Parent, va khong sort result. getinstancesofclass la alias cho cung function.

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

  ## Alias

  * `getinstancesofclass`

  ## Đối số

  <ParamField path={"className"} type={"string"} required>
    Exact ClassName string de match. Empty strings tao "ClassName required".
  </ParamField>

  ## Giá trị trả về

  <ResponseField name={"instances"} type={"table"}>
    New array table chua matching object values tu Instance cache table.
  </ResponseField>
</div>
