There are no errors that leaves me wondering why it doesn't award the badge. I requested help before and changed it accordingly, but for some reason, it still won't award the badge. It would help a lot if you see an error. Thanks.

local badgeservice = game:GetService("BadgeService")

local id = 2124571648 --- Put Badge ID here

local MarketplaceService = game:GetService("MarketplaceService")

local players = game:GetService("Players")

local ProductID = 983895018 --- Product ID Here

local function processReceipt(receiptInfo) 

    local player = players:GetPlayerByUserId(receiptInfo.PlayerId)
    if not player then


    return Enum.ProductPurchaseDecision.NotProcessedYet 

    else


badgeservice:AwardBadge(receiptInfo.PlayerId. UserId,id)   


    return Enum.ProductPurchaseDecision.PurchaseGranted

end

---e 

MarketplaceService.ProcessReceipt = processReceipt

1 comment

0

Do you have third party sales enabled that might be why it is not awarding the badges.