Dev products only working in local servers

When i purchase a devproduct it only works in a local server, not ingame nor in a team test. I understand it has something to do with multiple receipts but either way it still doesnt work when I attempted to fix it.

local MPS = game:GetService("MarketplaceService")

local productToMoneyMap = {
    [1585512192] = 6000,
    [1585533725] = 30000,
    [1585534350] = 115000,
    [1585535045] = 280000,
    [1585535384] = 1000000,
}

MPS.ProcessReceipt = function(receiptInfo)
    local player = game.Players:GetPlayerByUserId(receiptInfo.PlayerId)

    if player then
        print("Player found:", player.Name)
        local productId = receiptInfo.ProductId
        local moneyToAdd = productToMoneyMap[productId]

        if moneyToAdd then
            print("Processing receipt for ProductId:", productId)
            player.leaderstats.money.Value += moneyToAdd
            print("Money after update:", player.leaderstats.money.Value)

            return Enum.ProductPurchaseDecision.PurchaseGranted
        else
            print("Unknown product ID:", productId)
            return Enum.ProductPurchaseDecision.NotProcessedYet
        end
    else
        print("Player not found.")
        return Enum.ProductPurchaseDecision.NotProcessedYet
    end
end

if you got any suggestion for a fix that will be much appreciated

Simple basic questions, but where is the script located and is it a local or server script?

its a server script in sss________

I meant where is the script located in the Workspace? Please provide a screenshot of your Explorer window with all the relevant parents/children opened to show us exactly where it is.
For a really basic example:
Workspace > Model of house > model of living room > Folder of couch > seat cushion > “player sat” server script.

i just said the script is in server script service… if thats what you mean?

Ah, k. I didn’t know that’s what you meant by sss________. I thought you’d had a stroke.

:sweat_smile: the stupid character requirement made me have a stroke

anyways, you got any ideas on how to fix?

What do you mean by this? ^

Still need a fix, programmers where are you!!