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

[SOLVED] Purchasing a devproduct script not working. How do I fix?

Asked by 5 years ago
Edited 5 years ago

I am creating a shop GUI so when they click a button a bunch of info on the product appears then a purchase button appears. I made it so when they click the button it changes the value of the intvalue which is a child of the button. When I hit purchase it says MarketplaceService:PromptPurchase() second argument is not a valid productId (supplied productId was less than 0). How can I fix this?

local button = script.Parent
local id = script.Parent.DevProductID.Value
local devproductid = id

button.MouseButton1Click:connect(function()
    game:GetService("MarketplaceService"):PromptProductPurchase(game.Players.LocalPlayer,devproductid)

end)
0
It uses the ID of 0 instead of the value. TypicallyPacific 61 — 5y
0
fixed it. TypicallyPacific 61 — 5y
0
put [Solved] in title DinozCreates 1070 — 5y

Answer this question