Hello! I created wearing gui where you can see your accessories. I need to create button which will destroy this accessory but i only have AssetId from MarketPlace
maybe it will be useful
local includeRigidAccessories = true
local MarketplaceService = game:GetService("MarketplaceService")
local accessoriesTable = game:GetService("Players"):GetHumanoidDescriptionFromUserId(game.Players.LocalPlayer.UserId):GetAccessories(includeRigidAccessories)
for _, accessoryInfo in ipairs(accessoriesTable) do
local ASSET_ID = accessoryInfo.AssetId
local asset = MarketplaceService:GetProductInfo(ASSET_ID)
local Clone = game:GetService("ReplicatedStorage").DressUpEvents.AccRowFrm:Clone()
Clone.Parent = script.Parent.DressUp.Itemsdress.UsingTab
Clone.Name = asset.Name
Clone.Naame.Text = asset.Name
Clone.Pic.Image = "rbxthumb://type=Asset&id=".. tostring(ASSET_ID) .."&w=150&h=150"
end