I need help with this using the MarketplaceService. This keeps returning
- 13:18:42.808 ProcessReceipt is a callback member of MarketplaceService; you can only set the callback value, get is not available - Client - LocalScript:11
Help!! Here’s my code.
local MarketplaceService = game:GetService("MarketplaceService")
local ProductId = 1677294795
local plr = game.Players.LocalPlayer
function processReceipt()
script.Parent.bought:Fire(plr)
end
script.Parent.MouseButton1Click:Connect(function()
MarketplaceService:PromptProductPurchase(game.Players.LocalPlayer, ProductId)
if MarketplaceService.ProcessReceipt then processReceipt() end
end)
This is supposed to go on a TextButton inside a UI. the script.Parent.bought:Fire(plr) part is just for hooking it up to a server side script and there let it do the the rest of the job.