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

Marketplace script won't work?

Asked by 10 years ago
    Load.BuyPack.MouseButton1Click:connect(function() 
        game:GetService("MarketplaceService"):PromptPurchase(player,161883818) 
    end) 

This is supposed to make it so a player clicks the button called BuyPack in the frame Load, and prompts a purchase to buy a model. But it's not working. Please help. PS: THIS IS IN A SURFACE GUI, NOT A REGULAR GUI.

0
Are your variables defined? Perci1 4988 — 10y
0
I dont know PyccknnXakep 1225 — 10y

1 answer

Log in to vote
0
Answered by 10 years ago

You got the event Correct... Maybe. But you forgot to declare player

script.Parent.MouseButton1click:connect(function(player) --You forgot the "player" in the brackets...
game:GetService("MarketplaceService"):PromptPurchase(player,id)
end)

Make sure this is in a normal script... You're Welcome :D

0
This doesnt work. Fix it please? PyccknnXakep 1225 — 10y
Ad

Answer this question