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

my Developer product script won't work. Help?

Asked by
Prioxis 673 Moderation Voter
10 years ago

So I got my developer product but whenever I click the gui button it automatically gives me 5000 money which is what I want it to do but I don't have to buy the product for it to give me the money which is where the issue is

heres the code :

local productId = 19993414 
local player = game.Players.LocalPlayer

script.Parent.MouseButton1Click:connect(function()
    Game:GetService("MarketplaceService"):PromptProductPurchase(player, productId)
    player.leaderstats.Money.Value = player.leaderstats.Money.Value + 5000
end)

any idea on how I should do this?

1 answer

Log in to vote
0
Answered by
KAAK82 16
10 years ago

Check This.

Ad

Answer this question