---
title: "GetObjects"
description: "Loads a local asset through InsertService.LoadLocalAsset and wraps it in an array."
---

```lua
GetObjects(receiver: Instance, assetId: string): {Instance}
```

---

## Aliases

None.

---

## Arguments

<ParamField body="receiver" type="Instance" required>
  The Roblox receiver, normally game.
</ParamField>

<ParamField body="assetId" type="string" required>
  The local asset identifier or URI to load.
</ParamField>

---

## Returns

<ResponseField name="objects" type="{Instance}">
  An array containing the Instance loaded through InsertService.LoadLocalAsset.
</ResponseField>

Use GetObjects(game, id) or the intercepted game:GetObjects(id). The first argument is required. Replace the example ID with an available asset.

---

## Example

```lua
local ok, objects = pcall(GetObjects, game, "rbxassetid://123456789")
if ok then print(#objects) else warn(objects) end
```
