This is a yielding function. When called, it will pause the Lua thread that called the function until a result is ready to be returned, without interrupting other scripts.
The LoadAsset function returns a
Model|model inserted into
InsertService containing the asset.
For instance, if you want to load a Doge
Model, which has the asset Id 257489726, you would use the following statement:
This line would return an
Instance of the Doge model within your game. Changing the asset Id passed as an argument changes the asset that is loaded into your game.
Interested in finding Free Models or
Decal|Decals into your game? You can use the
See another example below!
The asset Id of the asset being loaded
An instance of the loaded asset