Client Script for a Dynamically Scripted Product Price Code Example Incorrect

Basically a minor typo in the code example for the Check for dynamic pricing section
Current Example:

local productInfo = MarketplaceService:GetProductInfo(PRODUCT_ID)
local price = productInfo.PriceInRobux

Needs to fixed with this or it won’t work.

local productInfo = MarketplaceService:GetProductInfo(PRODUCT_ID, Enum.InfoType.GamePass)
local price = productInfo.PriceInRobux

Page URL: https://create.roblox.com/docs/production/monetization/price-optimization#check-for-dynamic-pricing

1 Like

Hi Knight, thanks for catching this! Since the example on the doc page is about fetching a developer product and not a pass, I’m updating the code snippet to look like this:

local productInfo = MarketplaceService:GetProductInfo(PRODUCT_ID, Enum.InfoType.Product)
local price = productInfo.PriceInRobux

You’d use Enum.InfoType.GamePasses to fetch a pass, or leave it blank to fetch an asset (which is the default value). I’ll call this out on the page to avoid confusion in the future. The doc updates should be live soon :smile_cat:

Here’s the page about the InfoType enum, btw: InfoType | Documentation - Roblox Creator Hub

Is that a hint that products other than game-passes might have regional pricing abilities in the future? :grin:

Hah, I can neither confirm nor deny! :face_with_hand_over_mouth:

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