Can't fetch AppliedDescription() Accessories?

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?

GetAppliedDescription gets a cached version of the Humanoid’s HumanoidDescription. I image if no humanoid description is ever applied, which would be the case for static models, then it probably doesn’t work and returns a blank humanoid description. (i.e. GetAppliedDescription only works if a description was ever applied.)

Do your models have a humanoid description? If so, you should just use that instead.

pfttt, no description in humanoid wow. Didnt even know that was an instance, youre amazing thank you. It works now

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.