I wanted to add products to my game that give gems when you buy them, I copied the scripts from an older game I made (where the products work) and added it ti the game im working on right now. but the products didn't work
Script in button:
script.Parent.MouseButton1Click:Connect(function() game.MarketplaceService:PromptProductPurchase(game.Players.LocalPlayer, 1148720462) end)
script in ServerScriptService:
game.MarketplaceService.ProcessReceipt = function(reciptInfo) local plr = game:GetPlayerByUserId(reciptInfo.PlayerId) if reciptInfo.ProductId == 1148720462 then plr.leaderstats.Gems.Value = plr.leaderstats.Gems.Value + 250000 return Enum.ProductPurchaseDecision.PurchaseGranted end end
When I click the button the buy message pops up, when I click buy its says purshase succesfull but the gems aren't adding