Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Any way to delete recieptInfo for Dev Products after awarding what they bought?

I have a script that keeps re awarding the old product.

So lets just say you buy it 5 times, and you went to buy it the 6th time.. The other 5 would be in there so you wouldn't just be getting 1X the normal amount, it would be 6X because it's also awarding them again. I wouldn't believe it would be something as simple as this?

receiptInfo.PlayerId:destory()

It would look like this if that's the case.. If I am correct, that's good if i'm not.. I will need a bit of help.

local function buyItem(button)
	button.MouseButton1Click:connect(function()
		local marketId = button["market"].Value
		local pointsToAward = button["points"].Value
		link:PromptProductPurchase(plr,marketId) 
		link.ProcessReceipt = function(receiptInfo)
			if Enum.ProductPurchaseDecision.PurchaseGranted and receiptInfo.PlayerId == plr.userId then
				stat.Value = stat.Value + pointsToAward 
				receiptInfo.PlayerId:destory()
				
			end
		end
	end)
end

1 answer

✓ Accepted answer

Use MarketPlaceService. It's easier.

2 comments

0

What do you think I am using?

0

Probably a more complex way than what I was thinking. If this is MarketplaceService, then I think I might have a more simple version...

This discussion is preserved as it was. New answers, comments, and votes are closed.