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

Problem with game passes; not available for purchase?

Asked by
sheepposu 561 Moderation Voter
4 years ago
Edited 4 years ago

I am making a game for one of my clients. I finished the game and everything and gave it to them. They came back to me and said they were having problems with the game pass. They set it all up and it is under the store when I go to look at the game. I got the game pass somehow and when I go to the store, it says buy. When the client goes to the store it says "Owned", but they don't get any of the benefits coming with the game pass. When they click to buy it from in-game it says something about it not being available for purchase. When I click it, it says I already own the pass. No erorrs. Here is the code. Thx in advance for any help! LocalScript in the game pass button -

local id = workspace["VIP ID"].Value
local MPS = game:GetService('MarketplaceService')

script.Parent.MouseButton1Click:Connect(function()
    MPS:PromptGamePassPurchase(game.Players.LocalPlayer, id)
end)

Code for server script in ServerScriptService

local MPS = game:GetService('MarketplaceService')

MPS.ProcessReceipt = function(receiptInfo)
    local plr = game.Players:FindPlayerByUserId(receiptInfo.PlayerId)
    if not plr then
        return Enum.ProductPurchaseDecision.NotProcessedYet
    else
        return Enum.ProductPurchaseDecision.PurchaseGranted
    end
end
0
Go inside of the gamepass on the develop then your game page and make sure that it is selling, then choose a price and hit save. Used_Develop 14 — 4y
0
The game pass is available for sure as it shows in the shop tab under the game sheepposu 561 — 4y
0
Server code is code for Developer Product. You need a code for a GamePass instead. sleazel 1287 — 4y

Answer this question