Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

InsertService:LoadAsset() with the name of model, not asset id?

Asked by 3 years ago
Edited 3 years ago

I found a script from @TheEmoWu witch was about the Roblox InsertService api I concluded a code from the question of @TheEmoWu and it needs the asset ID. I want to know if it is possible to do the same thing without the asset ID, Just the name of the model.

Code from the question TheEmoWu asked:

--by: darkelementallord 

local ID = 0000000 --Change this to the model ID
local InsertService = game:GetService("InsertService") --Get the service

local Model = InsertService:LoadAsset(ID) --Insert the model
local NewModel = Model:GetChildren()[1] --Find your model

NewModel.Parent = workspace --Put it into the game
Model:Destroy() --Destroy the container model

Answer this question