The script below is not erroring or giving a gear of any sort. I have also printed after the 3rd line and if statement and did not receive a print in either part.
local gear = game:GetService("ServerStorage"):WaitForChild("HyperBike")
game:GetService("MarketplaceService").ProcessReceipt = function(receiptInfo)
if receiptInfo.ProductId == 966352459 then
local player = game:GetService("Players"):GetPlayerByUserId(receiptInfo.PlayerId)
gear:Clone().Parent = player.Backpack
end
return Enum.ProductPurchaseDecision.PurchaseGranted
end

11 comments
I don't understand why I need to use DataStoreService when the gears are one time purchases. Also that appears to be the exact same as what I had.
It's so if a player leaves and rejoins, they still get the reward (that is, if it was not given to them before). This is not the same thing you had. Try it out. It works for me.
I would have added gear saving if I wanted it..
It doesn't gear save. It's a feature so if a player leaves and somehow the script doesn't go through, they will get the gear in the next play session. This will NOT save the gear. Just try it out. It works for me.
It worked the first time I tried it, then after buying again I didn't get it.
I edited it without the data store. Not sure why that happened to you. Works just fine with me. Are you using a localscript or a serverscript?
server script
Alright, well, try my edited message
still not working lol i have no clue what the issue is
Weird. Not sure. That scripts works for me, and has been for the last year.
i have it working in another game, so there must be an issue with the game itself. i have no clue how to fix this.