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

What do I use in order to get the assets?

Asked by 6 years ago

So, what I'm trying to do is GetObjects, but it says "GetObjects" is not a member of DataModel. And I am not sure on what exactly to use to get them. Here it is.

game:GetObjects("rbxassetid://103727739")[1].Parent = game.Workspace
wait(0.5)
game.Workspace.Towers:MoveTo(game.Players.LocalPlayer.Character.Torso.Position + game.Players.LocalPlayer.Character.Torso.CFrame.lookVector* 30)
wait(2)
x = game:GetService("InsertService"):LoadAsset(163348575)
for i,v in pairs(x:GetChildren()) do
v.Parent = game.Players.LocalPlayer.Backpack
end

Appreciate the help.

1 answer

Log in to vote
0
Answered by 6 years ago

Looks like DataModel:GetObjects() is pending removal. Use InsertService:LoadAsset() like on line 5. The returned object will be a model containing the asset.

0
@WillieTehWierdo200, thank you so much, it worked. Accepting this answer. IIApexGamerII 76 — 6y
Ad

Answer this question