Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Developer product doesn't give player what they bought?

Asked by 6 years ago

This is a developer product that gives 100 subscribers. When I tested it, it did not work. I have looked over my script and have not been able to determine why. Can you guys figure this out?

local MarketplaceService = game:GetService('MarketplaceService')
local devproductid = 130515700

MarketplaceService.ProcessReceipt = function(receiptInfo)
    local plr = game:GetService("Players"):GetPlayerByUserId(receiptInfo.PlayerId)
            if receiptInfo.ProductId == devproductid then
                plr.leaderstats.Subscribers.Value = (plr.leaderstats.Subscribers.Value + 100)
            end
    return Enum.ProductPurchaseDecision.PurchaseGranted
end
0
plr.leaderstats.Subscribers.Value = plr.leaderstats.Subscribers.Value + 100 (try removing the brackets) killzebra312 -7 — 6y

Answer this question