getobjects(assetUrl) / GetObjects(assetUrl) / GetObjects(instance, path)
Loads an asset URL through game:GetObjects and returns the instances.
Syntax
getobjects(assetUrl: string) -> {Instance}
GetObjects(instance: Instance, path: string) -> {Instance}
Parameters
| Parameter | Type | Description |
|---|---|---|
assetUrl | string | Asset URL such as rbxassetid://125013769. |
instance / path | Instance / string | Legacy InsertService:LoadLocalAsset form. |
Returns
| Type | Description |
|---|---|
{Instance} | Loaded instances, unparented. |
Description
Logic change: getobjects now accepts an asset URL string and calls game:GetObjects(url), returning the resulting table of instances. This matches the standard executor API.
The previous two-argument form (InsertService, local asset path) is still available when the first argument is an Instance.
Example
local objects = getobjects("rbxassetid://125013769")
print(objects[1].ClassName)
Notes
- Instances are returned unparented; destroy them when finished.