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

Why won't code work? Developer Product Prompting

Asked by 5 years ago

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)
0
it shouldn't be in StarterGui DeceptiveCaster 3761 — 5y
0
Make sure this is running on the server ForeverBrown 356 — 5y
0
It's in a GUI, that's not supposed to be happening...^ User#24403 69 — 5y

Answer this question