ReferenceInstances

game.GetObjects

Loads a model or other asset and returns its objects.

Syntax

game:GetObjects(assetId: string) -> {Instance}

Parameters

ParameterTypeDescription
assetIdstringAn asset URL such as "rbxassetid://123456".

Returns

TypeDescription
{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

These are Game executor contracts. Check build requirements and session lifetimes before using them.