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

Gamepass purchase prompts the wrong gamepass?

Asked by 5 years ago

I double, triple checked that I had the right game pass id yet it shows another game pass which I did not make.

Here is the script:

local CLICK_BLOCK = script.Parent

local ITEM_ID = 6156156 -- This is my gamepasses id but it shows up as another item!!!

local Click = Instance.new("ClickDetector",CLICK_BLOCK)

Click.MouseClick:connect(function(p)

game:GetService("MarketplaceService"):PromptPurchase(p,ITEM_ID)

end)


(The code block is not working)

Anyways here is the game so you can see for your self: Test Place

1 answer

Log in to vote
1
Answered by
awfulszn 394 Moderation Voter
5 years ago

You are using :PromptPurchase when you should be using :PromptGamePassPurchase().

local CLICK_BLOCK = script.Parent
local ITEM_ID = 6156156 
local Click = Instance.new("ClickDetector",CLICK_BLOCK)

Click.MouseClick:connect(function(p)
    game:GetService("MarketplaceService"):PromptGamePassPurchase(p,ITEM_ID)
end)

Happy scripting!

Ad

Answer this question