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

How to fix Product, Currency not adding?

Asked by 3 years ago

I wanted to add products to my game that give gems when you buy them, I copied the scripts from an older game I made (where the products work) and added it ti the game im working on right now. but the products didn't work

Script in button:

script.Parent.MouseButton1Click:Connect(function()
    game.MarketplaceService:PromptProductPurchase(game.Players.LocalPlayer, 1148720462)
end)

script in ServerScriptService:

game.MarketplaceService.ProcessReceipt = function(reciptInfo)
    local plr = game:GetPlayerByUserId(reciptInfo.PlayerId)
    if reciptInfo.ProductId == 1148720462 then
        plr.leaderstats.Gems.Value = plr.leaderstats.Gems.Value + 250000
        return Enum.ProductPurchaseDecision.PurchaseGranted
    end
end

When I click the button the buy message pops up, when I click buy its says purshase succesfull but the gems aren't adding

0
maybe the purchase script is outdated CodeWon 181 — 3y
0
In the guidelines it says "Attempts should be your own work. Don't take a free model and expect us to fix it." If this doesn't work, you should be contacting the youtuber who made it. COOLGUY16T 37 — 3y
0
I have tried like 5 different scripts they all not work so its not the script that doesnt work jeboysisi 26 — 3y
0
I also never said this is a free model script I copied from a youtuber jeboysisi 26 — 3y

Answer this question