Hello, is there a way to get the sales count of a certain dev product, just like you can do it with gamepasses?
I think you’re looking for sales in the asset information
local id = "ProductIDHere"
local market = game:GetService("MarketplaceService")
local getInfo = market:GetProductInfo(id)
print(getInfo.Sales)
It just prints 0 instead of the actual sales number.
Is the product owned by you? And is the product for sale?
Because You should be handling it by telling your script that the item is indeed a Product and not an Asset. By default your Getting the info of an Asset. Product / Asset Id have different ID systems. Enum.InfoType.Product
Just ensures that :GetProductInfo() will be making sure to look for developer products instead of assets or the wrong items which could return 0.
Try something like this:
local ProductID = nil -- replace with Product ID!
local Marketplace = game:GetService("MarketplaceService")
local ProductInfo = nil
local Success, Fail = pcall(function()
ProductInfo = Marketplace:GetProductInfo( ProductID, Enum.InfoType.Product)
end)
if Success and ProductInfo then
print("Name of Product: "..ProductInfo.Name..", ProductID: "..ProductInfo.ProductId) --Other print to ensure you have the right item!
print(ProductInfo.Sales) --Information your Looking for
else
warn("Failed to get Product Info")
end
Let me know if it still returns 0, or if you have any Questions or Errors!
It prints the name and ID, but the sales are shown as nil.
There are no errors.
I had over 20 sales for that specific dev product.
Then I don’t think you can track the amount of sales without using data stores. Because While I think .Sales really mean how many people own that asset, or item. And well you really can’t “Own” and developer product like other things.
If you really need this information I recommend you track when someone buys the developer product and add one into a datastore that tracks info about the developer product, Unless you can Figure out a easier method, like if there is some sort of error in that script I didn’t catch, or something else entirely.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.