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

Developer Products in a gui?

Asked by
danglt 185
5 years ago

The script it suppose to play a sound if bought but its not working, I don't know why

ID = script.Parent.Text
local MarketplaceService = game:GetService("MarketplaceService")
local buyButton = script.Parent
local productId = 426543916
local player = game.Players.LocalPlayer





buyButton.MouseButton1Click:connect(function()
    MarketplaceService:PromptProductPurchase(player, productId)

        for i, player in ipairs(game.Players:GetChildren()) do

    game.Workspace.Sound = ID

            end
        end)

0
Not working isn't much of a help, can you give more detail? gitrog 326 — 5y
0
i need the script when clicked the text button the id in the text box will be played when bought danglt 185 — 5y
0
Which part of it is not working? Is the purchase not showing up or is the sound not playing, or both? Kev_nn 4 — 5y

Answer this question