Getting the price of a dev product not working

I made this script which finds the price of a dev product although the price which ends up getting listed is always 5 robux (despite the product price being 25 robux or 50 robux)

This is the script I am using:

local Name = script.Parent.Title.Text
local Checkout = script.Parent.Parent.Parent.Parent.Checkout
local ID = script.Parent.ID.Value

local Market = game:GetService("MarketplaceService")

local info = Market:GetProductInfo(ID)

local price

-- Fill in data:

if info then
	script.Parent.Price.Text = info.PriceInRobux
	price = info.PriceInRobux
	
	print (info.PriceInRobux .. ": Price for 50 coins") -- This prints out: "5: Price for 50 coins  -  Client - Click:17"
else
	print ("Could not assign price! - " .. Name)
end

What can I do to make it use the correct price instead of saying 5 robux?

Change to:

local info = Market:GetProductInfo(ID, Enum.InfoType.Product)

Because it thinks you are finding the ID of a gamepass, and not a developer product.

1 Like

This is correct

However, this is not correct

infoType defaults to Asset if nil, not game pass

3 Likes

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