So, I want to make Textbuttons on my game automatically update to the current price of the devproduct so I don’t have to change them myself. However im having some issues here.
Im asking the script to print the price in robux but it outputs 5 when the price is 49.
I have tried this with other devproducts aswell and then I got a nil output.
Script:
local MS = game:GetService("MarketplaceService")
local AssetId = 1547731272
local Asset = MS:GetProductInfo(AssetId)
wait(1)
print(Asset.PriceInRobux)
local MarketplaceService = game:GetService("MarketplaceService")
local productId = 000000 -- Change this to your developer product ID
local productInfo = MarketplaceService:GetProductInfo(productId, Enum.InfoType.Product)
local success, productInfo = pcall(function()
return MarketplaceService:GetProductInfo(productId, Enum.InfoType.Product)
end)
if success then
-- Use productInfo here!
end