I’m working on a donation system for a game, and there’s a list of Robux amounts that the player can choose from (shown below).
Each button is to prompt the player to purchase a corresponding developer product, but the “25 Robux Donation” isn’t working. I’m not sure why. The code is the same for each button with the exception of their respective IDs.
Code
local MarketplaceService = game:GetService("MarketplaceService")
local player = game.Players.LocalPlayer
local id = 1118524989
script.Parent.MouseButton1Click:Connect(function()
MarketplaceService:PromptProductPurchase(player, id)
end)
Whenever I click it, the prompt tells me that it’s not on sale.
This could be an issue with the product itself, if you haven’t already checked and confirmed that the dev product is for sale then here are some solutions you could try:
As mentioned in my post, there isn’t an option to disable sales for developer products. I attached my code and a screenshot of the developer product’s details to show that I’m using the correct ID.
I plan to use the first solution if all else fails, but I’m trying to solve the original issue instead of avoiding it.
I tried your code and it worked for me so I would recommend just making another product of the same details could just be a roblox glitch, Hope this helps
If you put it into a normal textbutton (without connecting it to the board) does it still give the same problem? Otherwise, I’d see if just making a new devproduct fixes it.