Why isn't this calculating the full price?

Hey. So I have a script that calculates someone’s avatar value, but when I try to calculate ColdDeveloper’s avatar (Which I know is well over 50 million) it shows up as like 13,000.

The LocalScript:

local Players = game:GetService("Players")
local player = Players.LocalPlayer

local MarketplaceService = game:GetService("MarketplaceService")

local PlayerNameBox = script.Parent.PlayerName
local Check = script.Parent.Check

local PlayerName

local function AvatarWorth(id)
	local info = Players:GetCharacterAppearanceInfoAsync(id)
	local items = info.assets
	local AvValue = 0

	for i, v in pairs(items) do
		local ProductInfo = MarketplaceService:GetProductInfo(v.id, Enum.InfoType.Asset)
		
		if ProductInfo.IsForSale then
			AvValue += ProductInfo.PriceInRobux
		end
	end

	return AvValue
end

PlayerNameBox.FocusLost:Connect(function()
	PlayerName = tostring(PlayerNameBox.Text)
end)

Check.MouseButton1Click:Connect(function()
local PlayerId = Players:GetUserIdFromNameAsync(PlayerName)
		
		local AvatarValue = AvatarWorth(PlayerId)

	if PlayerName ~= nil then
		script.Parent.Parent.AvatarWorth.Text = PlayerName.."'s avatar is worth "..AvatarWorth(PlayerId)
		
	end
end)

The MarketPlaceService PriceInRobux value is the original value, not the current best price for a limited.

Ahh, gotcha. Would you know how I would make it so that it’s calculating it’s current price?

I’m not aware of an API built into the Roblox Lua API (Maybe there is one, but like I said, I’m unaware of it.)

I know you can get them via REST API call like so:
GET https://economy.roblox.com/v1/assets/21070012/resellers?cursor=&limit=100
This would give you the first 100 reseller prices for the Dominus Empyreus

It’s important to note though, you cannot make requests to .roblox domains from within Roblox. You’d need to create (or use an existing) proxy service and make your requests there instead.

The lowest price for the item is listed first, I believe. I didn’t see this endpoint documented on Roblox’s API website but it is a thing.