Hello! I was working on Process Receipt system, but for some reason it wont work.
Im a bit confused on why this is happening because it wont even print.
Here is my code
local function ProcessGlowstick(receiptInfo)
print("Passing")
local plr = game.Players:GetPlayerByUserId(receiptInfo.PlayerId)
if plr then
for _,v in pairs(workspace.GlowstickPrompts:GetChildren())do
if receiptInfo.ProductId == v.ClickDetector.ProductID.Value then
local Tool = game.ReplicatedStorage.Gears:FindFirstChild(v.ClickDetector.ItemName.Value):Clone()
Tool.Parent = plr.Backpack
Tool.Parent = workspace
Tool.Parent = plr.Character
print("Worked")
return Enum.ProductPurchaseDecision.PurchaseGranted
else
return Enum.ProductPurchaseDecision.NotProcessedYet
end
end
else
return Enum.ProductPurchaseDecision.NotProcessedYet
end
end
MarketPlaceService.ProcessReceipt = ProcessGlowstick
First question, do you have a donation board in the game you’re testing this on or anything that uses Processreceipt besides this?
Secondly, the way you have it set up for the returning is a bit weird. You should only make it return PurchaseGranted and NotProcessYet after it has finished looping through the children via variable that is true if the condiition was met and false if it wasnt
The donation board is taking up the only ProcessReceipt callback space there is, you need to make the donation board ProcessReceipt work with yours. I can help with that if I know the board used, which board are you using, the one by Nitefal?