Okay, so I want this script to be able to give the player a certain amount of coins when they buy it.
Okay, so the FIRST script where it gives 100 COINS everytime you buy it works, but…the second script where it gives 450 COINS doesn’t. Instead it’ll give 100 coins still.
I hadn’t found one thing to fix my situation.
-- SECOND SCRIPT FOR 450 COINS
local function processReceipt(receiptInfo)
local player1 = players:GetPlayerByUserId(receiptInfo.PlayerId)
if not player1 then
return Enum.ProductPurchaseDecision.NotProcessedYet
end
if player1 then
coins.Value = coins.Value + 450
end
return Enum.ProductPurchaseDecision.PurchaseGranted
end
MarketPlaceService.ProcessReceipt = processReceipt
– FIRST SCRIPT FOR 100 COINS
local function processReceipt(receiptInfo)
local player1 = players:GetPlayerByUserId(receiptInfo.PlayerId)
if not player1 then
return Enum.ProductPurchaseDecision.NotProcessedYet
end
if player1 then
coins.Value = coins.Value + 100
end
return Enum.ProductPurchaseDecision.PurchaseGranted
end
MarketPlaceService.ProcessReceipt = processReceipt