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

How do I insert an object from the catalog to workspace?

Asked by 9 years ago

Hello, today I am trying to see some scripts that roblox uses on his gear, and I remember I used this code on the command bar to put an asset from the catalog to the workspace of my game, but it doesn't works anymore heres the code that I used before:

game.Workspace:InsertContent("http://www.roblox.com/asset/?id=??????????")

Is there any other way to get an asset from the catalog and insert it on workspace?

1 answer

Log in to vote
1
Answered by 9 years ago

It seems that users are no longer authorized to insert catalog objects in to games with that method anymore. You can try the line below in the command bar and it should work. You can learn more about Insert Service in the link below.

http://wiki.roblox.com/index.php?title=API:Class/InsertService

game:GetService("InsertService"):LoadAsset("IDHERE"):GetChildren()[1].Parent = game.Workspace
0
Thank you! biocommand 30 — 9y
Ad

Answer this question