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

Don't understand why reward isn't given after purchase?

The script is located in the ServerScriptService, it isn't a local script. I don't understand why this script doesn't work in main game but does in alternative game with different products ids.

local MarketplaceService = game:GetService("MarketplaceService")

MarketplaceService.ProcessReceipt = function(purchaseInfo)
	local plr = game:GetService("Players"):GetPlayerByUserId(purchaseInfo.PlayerId)
	if purchaseInfo.ProductId == 349843507 then
		plr.leaderstats.Coins.Value = plr.leaderstats.Coins.Value + 100
		
	end
	return Enum.ProductPurchaseDecision.PurchaseGranted
end

3 comments

0

product is broken?

0

is your game filtering enabled

0

Is the game published in roblox? It probably doesn't work if it's saved in your computer.

1 answer

Well I know a script that can handle that perfectly, in Toolbox search Zed’s Marketplace then click the one that is most Popular with the best logo then in the Purchase Handler put the ProductId in the DevProduct Section like this [ProductId] then under write the amount of coins for example for 200 Coins write 200

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