im trying to make a catalog editor esque thing for creating enemies for a sandbox mode in a TD game, and im getting everything using AvatarEditorService while importing everything using InsertService, problem is, InsertService:LoadAsset() only inserts things that you own (to my knowledge)
how can i still import accessories without owning them?
That only counts for models and animations. You can insert any accessory from the marketplace
My bad, you can insert anything with InsertService as long as the asset not private
ive been looking up why it hasnt been working and im really confused since avatar editor games do exist.
heres the initial code that runs
local pagesObject = AvatarEditorService:SearchCatalog(catalogSearchParams)
local currentPage = pagesObject:GetCurrentPage()
for i, item in currentPage do
local NewCosmetic = game.ServerStorage.CosmeticFrame:Clone()
NewCosmetic.AccessoryName.Text = item["Name"]
local Success, Model = pcall(InsertService.LoadAsset,InsertService,item["Id"])
if Success and Model then
local Accessory = Model:FindFirstChildOfClass("Accessory")
Accessory:FindFirstChild("Handle").Position = Vector3.new(0,0,-4)
Accessory.Parent = NewCosmetic
NewCosmetic.Id.Value = item["Id"]
NewCosmetic.Parent = SelectionFrame
end
end
edit: this script attempts to load an accessory (fails) and then puts it into a button the user can press to select the item