我正在与Roblox InsertService:LoadAsset() API合作,它可以导入模型、标记、脚本等.我试图做同样的(导入模型和标记),只是以模型的名称,而不是id。
代码为@darkelementallord (roblox):
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发布于 2021-08-16 06:53:50
不能仅以Asset的名称加载带有InsertService的Asset。您需要AssetId的Asset来加载它。
https://stackoverflow.com/questions/68625628
复制相似问题