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

My cash vendor wont work to add cash to the player?

I have this script but I don't know how to Process a Receipt and add cash:

local id = 44311080 


script.Parent.MouseButton1Down:connect(function(player)
	game:GetService("MarketplaceService"):PromptPurchase(player, id)
	-- I dont know how to make it add cash if they buy
end)

2 comments

0

Read the wiki on developer products. http://wiki.roblox.com/index.php?title=Developer_product

1 answer

Hello, HttpDevz!

So from what I understand, you are making a robux-to-currency product. And I am going to help you assuming that the cash is in your leaderboard.

So here goes:

local id = 44311080 


script.Parent.MouseButton1Down:connect(function(player)
    game:GetService("MarketplaceService"):PromptPurchase(player, id)
    	player.leaderstats.Cash.Value = player.leaderstats.Cash.Value + 300 --Change the '300' to whatever cash you want to give them
end)

--Also I put 'leaderstats', just change it to the parent of the Cash value

Thanks, Radio

If this helped you, accept this answer, it helps both of us :)

2 comments

1

Omg thanks so much :)

0

pls accept my answer

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