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

when i buy a dev product i made for my game in studio. i dont get the coins?!

so basically when i bought the dev product i should have gotten the coins. but. i didn't. and i got a message in the output saying data store request.. i tried multiple different scripts... and its the exact same.. if you know how to fix this.. PLEASE tell me! (:

button GUI script:



local id = 1157603502
local mps = game:GetService("MarketplaceService")
local plr = game.Players.LocalPlayer


script.Parent.MouseButton1Click:Connect(function()
	mps:PromptProductPurchase(plr, id)
end)


Dev Product Handler Script:




local MarketPlace = game:GetService("MarketplaceService")
local id1 = 1157603502
id1Reward = 1000


MarketPlace.ProcessReceipt = function(receiptInfo)
	if receiptInfo.ProductId == id1 then
		local plr = game.Players:GetPlayerByUserId(receiptInfo.PlayerId)
		plr.leaderstats.chords.Value = plr.leaderstats.chords.Value + id1Reward
		return Enum.ProductPurchaseDecision.PurchaseGranted

	end
end


1 comment

0

A way you could test if it works or not is make the cost to be free at first and go to an alt account and make the alt buy the product and see if it give the alt the money, if it doesn't then something is wrong in the script but if it works then you can revert the price to be how much you want.

1 answer

Hey Mate, I believe that because it's a Test / You are in studio, it's not going to charge you.

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