I am trying to make it so if you buy a Dev Product, you get awarded a badge. See anything wrong?
Asked by
4 years ago Edited 4 years ago
Someone helped me with this before, but I had a hard time changing it. If you do see a problem, please tell me which lines to change. I believe the problem is on lines 13-14. Thanks!
01 | local badgeservice = game:GetService( "BadgeService" ) |
05 | local MarketplaceService = game:GetService( "MarketplaceService" ) |
07 | local players = game:GetService( "Players" ) |
09 | local ProductID = 98389501 |
11 | local function processReceipt(receiptInfo) |
13 | local player = players:GetPlayerByUserId(receiptInfo.PlayerId) |
17 | return Enum.ProductPurchaseDecision.NotProcessedYet |
22 | badgeservice:AwardBadge(plr. UserId,id) |
26 | return Enum.ProductPurchaseDecision.PurchaseGranted |
32 | MarketplaceService.ProcessReceipt = processReceipt |