Marketplace not calling processReceipt

Hello, I am really confused. I have a music system that I was commissioned for and it works 100% completely fine in my testing game but when I add it to the game I was commissioned for everything that works except the music request system, I tried to add printing to it so when it calls process receipt it will print something but nothing happens, its like there was no purchase made.

Here are the nessassary scripts:



image

1 Like

Try this,

MarketplaceService.ProcessReceipt = function(details)
   for _, player in ipairs(game.Players:GetChildren()) do -- added getchildren
        if player.Userid == details.PlayerId then
            if details.ProductId == ProductId.Value then
                AddSong:FireClient(player)
return Enum.ProductPurchaseDecision.PurchaseGranted
      
            end
        end
    end
end

Nope, and if I am correct. Using game.Players:GetPlayers() is more efficient than game.Players:GetChildren()

Well, if it works on 1 game it must be your side issue, not ROBLOX’s.

Yeah I know, I meant maybe it requested to many times or the game got blacklisted from something I truly have no idea.

I don’t know, hopefully someone else can help you. :heart: :revolving_hearts: :star_struck:

I already did, in my post, I said It works on my testing game but not the game that commissioned me. Trying it 3 times would do nothing because I already know that it works on 1 and not the other.

Edit: The person edited there message for some odd reason? But thanks I guess.

Still need help… please… :smiley:

I’ll fix this, I’ll return soon as I’m done fixing it for you, wish I’ve seen this sooner!

Uhh… what, sorry I don’t understand?

Ah, sorry.

I’m going to go ahead and try helping you out, if you don’t mind.

Oh yes thank you that would be great!

How many ProcessReceipt scripts do you have? You can only call this in one script, so I suggest moving it to a module, then calling it from whatever script you need. This may be your issue.

This is the only script I have it in. The only exception is the Donation Board by NightFal which shouldn’t matter, right? But I already tried disabling it and it still didn’t work.

The donate board is your problem. It uses processreciept to handle donations, so you are going to have to integrate the two. You tried deleting the model entirely? See if it works then.

That is so weird, I disabled all the scripts it was linked to but it only works when I completely delete it. Its working now thank you.

1 Like

For future reference, you can only have 1 ProcessReciept function in your game. You will have to combine the two processreciept functions together, if you are wanting to keep the donation board. Make sure to mark this thread solved, so future people can easily find it if they are struggling with similar problems :slight_smile: