Hello again, I’m working on a game and i have a way to buy currency through ui. You are able to buy the products but you don’t get any money in return, can anyone help me fix my issue. I can provide screenshots of the code and what not.
post the code, we cant rly do anything without it
script from ServerScriptService, Script - Roblox Studio (gyazo.com)
script from one of the buy button things: LocalScript - Roblox Studio (gyazo.com)
my currency is Coins
would i try that in the LocalScript in the buy buttons or the SSS one?
nevermind, dont look at my reply.
also what is the ProcessReceipt function for?
i cant see you use it anywhere.
idk, i attempted to watch a tutorial but it didnt really help
actually i think that part is where you actually buy the coins
someone told me its because you cant have more than 1 ProcessReceipt
try inserting this script into server script service:
if it doesnt work, let me know what does the console say
function ProcessReceipt(receiptInfo)
insert the prompt process function
end
local mps = game:GetService("MarketplaceService")
mps.PromptPurchaseFinished:Connect(function(info)
if info.isPurchased == true then
local promptinfo = {}
promptinfo.PlayerId = info.player.UserId
promptinfo.ReceiptId = info.assetId
ProcessReceipt(promptinfo)
end
end)
maybe try making the function into a pcall not sure about that but try it
I would recommend reading MarketplaceService.ProcessReceipt
It has a thorough explanation of ProcessReceipt as well as an example (with code) that you can easily replicate for your case.
would that go at the end? either way beginning or end it had error lines
make a new script in the server script srevcie
i think you should make a new topic, also check your groups funds (if you have a group)
- this isnt the place for that
- it takes 12 days to get any funds/robux from roblox
oh ok
thanks i didn’t know that
someone helped me fix it, thank you though