I want it so that when you click an image button, it prompts the Developer product, but it doesn't work. It is in a local script located under startergui.
local MarketplaceService = game:GetService("MarketplaceService")
local Players = game:GetService("Players")
local productID = 453120071
local function promptPurchase()
local player = Players.LocalPlayer
MarketplaceService:PromptProductPurchase(player, productID)
end
script.Parent.ShopButton.MouseButton1Click:Connect(promptPurchase)

3 comments
it shouldn't be in StarterGui
Make sure this is running on the server
It's in a GUI, that's not supposed to be happening...^