Product price comes up as nil

Introduction:

Recently, I have been trying to make a GamepassGUI, that will display the price of a gamepass automatically using: “GetProductInfo”, sadly this has not been working. Here’s the following code I am using to achieve this:

Code:

local ProductInfo = mps:GetProductInfo(12010264, Enum.InfoType.Product)
local Price = ProductInfo.PriceInRobux
print("Product price: ", Price)

Extra:

On line 3, it’s print the following: “Product price: nil”. I am not sure to as of why or what is causing this so, any and all help will be appreciated, so thank you in advance! :smile:

You’re 2nd parameter for the GetProductInfo function isn’t a valid entry which is why it was returning nil, replace Enum.InfoType.Product with Enum.InfoType.Gamepass as the Product you are checking is a GamePass and not a product! :smiley:

1 Like

Ahh I see now thank you, quite a silly mistake of me! :laughing: