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
