Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

GetProductInfo returning an empty table?

Asked by 4 years ago

I'm trying to get information about a developer product in my game using this code:

local marketService = game:GetService("MarketplaceService")
local product = 996552931
local info = marketService:GetProductInfo(product)
print(#info)

The result I get is an empty table, and #info is 0. What's going on?

0
Are you trying to get the name of the product/or asset? Player1_Joined 271 — 4y
0
I'm trying to get the price of the product. 510lliw 2 — 4y
0
Is the product a gamepass? Player1_Joined 271 — 4y
0
It's a developer product for buying in-game currency. 510lliw 2 — 4y

1 answer

Log in to vote
0
Answered by 4 years ago
local info = game:GetService("MarketplaceService"):GetProductInfo(996552931, Enum.InfoType.GamePass).PriceInRobux
print(info)

This should probably work.

0
I needed to change GamePass to Product, since it's a developer product, but besides that, this works. Thanks! 510lliw 2 — 4y
Ad

Answer this question