Not awarding player, with no debug error?
For whatever reason this does not award the player their player points they bought, and it does not show any error in the debug. Any idea?
This works with buying extra cash, but not player points for some reason, even tried prints and nothing showed up.
01 | local Service = Game:GetService( "PointsService" ) |
11 | local Prompt = Game:GetService( "DataStoreService" ):GetDataStore( "PurchaseHistory" ) |
13 | Game:GetService( "MarketplaceService" ).ProcessReceipt = function (Receipt) |
14 | local PlayerProductKey = Receipt.PlayerId.. "_" ..Receipt.PurchaseId |
15 | for _,Player in pairs (Game.Players:GetChildren()) do |
16 | if Player.userId = = Receipt.PlayerId then |
17 | for i, v in pairs (Products) do |
18 | if tostring (Receipt.ProductId) = = i then |
19 | Service:AwardPoints(Player.userId, v) |
20 | Prompt:IncrementAsync(PlayerProductKey, 1 ) |
21 | return Enum.ProductPurchaseDecision.PurchaseGranted |