game.GetObjects
Loads a model or other asset and returns its objects.
Syntax
game:GetObjects(assetId: string) -> {Instance}
Parameters
| Parameter | Type | Description |
|---|---|---|
assetId | string | An asset URL such as "rbxassetid://123456". |
Returns
| Type | Description |
|---|---|
{Instance} | The asset's root objects. |
Description
The engine removed GetObjects from the client; Apex provides it on game again. The asset is downloaded and read with Apex's own model reader, and the objects are returned unparented, ready to place where you want them.
Example
local objects = game:GetObjects("rbxassetid://0000000")
for _, object in objects do
object.Parent = gethui()
end
Notes
- Only assets the current account can load are available.
These are Game executor contracts. Check build requirements and session lifetimes before using them.
