Wearde... So at first, I got an error I believe I fixed it. Please help me fix this script:
Also the error its giveing me is: ServerScriptService.BuyCash.1:26: unexpected symbol near '?'
-- setup local variables local MarketplaceService = Game:GetService("MarketplaceService") local productId = 236341078 -- define function that will be called when purchase finished MarketplaceService.ProcessReceipt = function(receiptInfo) -- find the player based on the PlayerId in receiptInfo for i, player in ipairs(game.Players:GetChildren()) do if player.userId == receiptInfo.PlayerId then -- check which product was purchased if receiptInfo.ProductId == productId then -- give them the cash player.leaderstats.Money.Value = player.leaderstats.Money.Value + 250 end end end -- tell ROBLOX that we have successfully handled the transaction return Enum.ProductPurchaseDecision.PurchaseGranted end)
Also if you're going to fix it do not give me a link to the Roblox wiki or something please give me the script or tell me why this is happening and help me fix it..
I found what's causing the problem. On line 8 it says (in your code)
MarketplaceService.ProcessReceipt = function(receiptInfo)
The equal symbol ("=") never is in the start of a function
. Fix that line to this:
MarketplaceService.ProcessReceipt:connect(function(receiptInfo)
Read the link below about functions: (I know you sad no Wiki links but it's gonna help you)
~Chez_Guy, Dev.