So, I’m trying to make it so when you click a UI button you’ll get prompted to buy a dev product.
Whenever I try to click on the button, it prompts me to purchase but then says something went wrong try again later.
Well, the roblox dev hub script didn’t work so I just used the script I had used for gamepasses and tried it out.
This is my script: script.Parent.MouseButton1Click:connect(function() game:GetService("MarketplaceService"):PromptGamePassPurchase(game.Players.LocalPlayer,1158617163) end)
I just need to know, can you use scripts that were made for gamepasses? Would I have to make a new script? Any help is appreciated. Thanks!
Because PromptGamePassPurchase is exclusively for prompting gamepass purchases (as the name suggests lol), use PromptProductPurchase. This will prompt developer products.
local Player = game:GetService('Players').LocalPlayer
local MarketplaceService = game:GetService('MarketplaceService')
script.Parent.MouseButton1Click:Connect(function()
MarketplaceService:PromptProductPurchase(Player,1158617163)
end)