ms.ProcessReceipt = function(receiptInfo)
local productID = receiptInfo.ProductId
local player = game.Players:GetPlayerByUserId(receiptInfo.PlayerId)
if player then
local handler = productFunctions[productID]
local success, result = pcall(handler, receiptInfo, player)
if success then
print("pass")
if productID == 1335381123 then
raidStart()
end
return Enum.ProductPurchaseDecision.PurchaseGranted
else
warn("Failed to process receipt:", receiptInfo, result)
end
end
end
Can someone tell me why this returns an error saying “attempt to call a nil value”? Thanks in advance