Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Developer product script not working?

Asked by 9 years ago

Hi guys! I made this script a few months ago and it was working fine....it is now not working :( Any ideas? Thanks!

local MarketplaceService = game:GetService("MarketplaceService")
local productId = 19750967
MarketplaceService.ProcessReceipt = function(receiptInfo) 

    for i, player in ipairs(game.Players:GetChildren()) do
        if player.userId == receiptInfo.PlayerId then

            if receiptInfo.ProductId == productId then

            player.PlayerGui.ChoosingMap.Frame.Visible = true
                       game.Workspace.ChooseMap.Value = true


            end
        end
    end 

    return Enum.ProductPurchaseDecision.PurchaseGranted     
end

1 answer

Log in to vote
0
Answered by
Goulstem 8144 Badge of Merit Moderation Voter Administrator Community Moderator
9 years ago

I honestly see nothing wring with that code. Maybe it's how you're doing the rest of it. I see you're changing a value in workspace.. but this is a DevProduct so that could be risky, the value can change when you don't want it to.

Maybe if you elaborated on what this was for I could try to help more effectively.

0
OK! Thanks - I also see nothing wrong with it whatsoever. I am basically trying to change a boolvalue in the workspace and display a gui to the player when they purchase a developer product! jjwood1600 215 — 9y
Ad

Answer this question