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

Why is this script not working?

Asked by 10 years ago

I have 2 identical scripts, both in the same type of GUI (I copied one, and put it into startergui) and one works fine, the other doesn't work, then causes the first GUI to not work. Here is the script in both (Output says nothing)

local productId = 160676880
script.Parent.MouseButton1Click:connect(function()
    player=script.Parent.Parent.Parent.Parent.Parent
    Game:GetService("MarketplaceService"):PromptProductPurchase(player, productId) -- should pop up a dialog that prompts the player
end)

Answer this question