The prompt purchase appears correctly however when the transaction is completed the product does not appear in their inventory. This script is located in ServerScriptService and the tool is located in Replicated Storage. When I run it gives me no error but still wont put the popcorn in to the players backpack. Any help is appreciated.
local MarketplaceService = game:GetService("MarketplaceService") MarketplaceService.ProcessReceipt = function(receiptInfo) local players = game.Players:GetPlayers() for i=1,#players do if players[i].UserId == receiptInfo.PlayerId then local RS = game:GetService("ReplicatedStorage") local item = RS:WaitForChild("Popcorn") local cloned = item:Clone() local player = game.Players:GetChildren() cloned.Parent = player.Backpack cloned.Parent = player.StarterGear print("cool") end end return Enum.ProductPurchaseDecision.PurchaseGranted end