Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

PP giving not working?

This stopped working after I put the v.Backpack.Plyr.IceOwnedline. Any ideas why?

local MarketplaceService = Game:GetService("MarketplaceService")
local ds = game:GetService("DataStoreService"):GetDataStore("PurchaseHistory")
 
CASHID = 20121128 --PUT ID HERE

MarketplaceService.ProcessReceipt = function(receiptInfo)
	local playerProductKey = "player_" .. receiptInfo.PlayerId .. "_product_" .. receiptInfo.ProductId
	local numberBought = ds:IncrementAsync(playerProductKey, 1)
	for i,v in pairs (game.Players:GetChildren()) do
		if v.userId == receiptInfo.PlayerId then
			if receiptInfo.ProductId == CASHID then
				
					game.ServerStorage.Ice:Clone().Parent = v.Backpack
					v.Backpack.Plyr.IceOwned.Value = true
			end
		end
	end
	return Enum.ProductPurchaseDecision.PurchaseGranted	
end

1 answer

Check if that line is valid instance.

1 comment

0

The output is 'doAcceptPurchase success from ypcall is true reason is nil'

This discussion is preserved as it was. New answers, comments, and votes are closed.