-
What do you want to achieve?
I’m trying to create a button that prompts a player with a developer product. -
What is the issue?
I keep getting an error when I click the button shown in the image below
-
What solutions have you tried so far?
I’ve looked all over the dev forums but found no help, I’ve also turned on all services and tested the product both in studio and in the game client but I kept getting the same error
Here in the script I’m using to prompt the products
local MarketplaceService = game:GetService("MarketplaceService")
local Players = game:GetService("Players")
local player = Players.LocalPlayer
local productId = 20712321
local function promptPurchase()
MarketplaceService:PromptProductPurchase(player, productId)
end
script.Parent.MouseButton1Up:Connect(function()
promptPurchase()
end)