This stopped working after I put the v.Backpack.Plyr.IceOwned
line. 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
Check if that line is valid instance.