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

Developer Product Problem?

Asked by
RoyMer 301 Moderation Voter
9 years ago

When I do this, the line store.Value=0 is not working, what could the problem be?

MarketplaceService = Game:GetService("MarketplaceService")
MarketplaceService.ProcessReceipt = function(receiptInfo)
players = game.Players:GetPlayers()
for i=1,#players do
if players[i].userId == receiptInfo.PlayerId then
wait(1)

local cash = players[i]:FindFirstChild("ds"):FindFirstChild("Cash")
local store = players[i]:FindFirstChild("ds"):FindFirstChild("Store")
cash.Value = cash.Value + store.Value
store.Value = 0
end

end
end
return Enum.ProductPurchaseDecision.PurchaseGranted 

Answer this question