function GetModelWorth(model)
local humanoid: Humanoid = model:FindFirstChildWhichIsA("Humanoid")
if humanoid then
local description = humanoid:GetAppliedDescription()
local avatarWorth = 0
local items = description:GetAccessories(true)
print(items)
for _, item in pairs(items) do
print(tostring(item.AssetId) .. " " .. tostring(item.AccessoryType))
local ProductInfo = MarketplaceService:GetProductInfo(item.id,Enum.InfoType.Asset)
if ProductInfo.IsForSale then
avatarWorth += ProductInfo.PriceInRobux
end
end
return avatarWorth
else
warn("Humanoid not found in model")
return 0
end
end
This is my code, print(items) is returning an empty table. The model is an in game model so getting by userid wont work. This is a local script could this affect something like this?