Add Assets to the Game Using Code

Add Assets to the Game Using Code

Mar 30 2021, 5:19 AM PST


You want to insert a free model from a script, into your game.


Use the LoadAsset method.

game:GetService('InsertService'):LoadAsset(1234):GetChildren()[1].Parent = Workspace


The LoadAsset method takes an argument of what the ID of the asset you’re trying to get. Make sure that the asset is in your models or else you won’t be able to use it. Then it returns a model with the inserted asset in it. To get the first member of this wrapping model I use GetChildren and index the first one. Then this gets parented to the Workspace.

  • asset
  • model
  • coding
  • script