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 6 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§

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
6 years ago

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

1local CLICK_BLOCK = script.Parent
2local ITEM_ID = 6156156
3local Click = Instance.new("ClickDetector",CLICK_BLOCK)
4 
5Click.MouseClick:connect(function(p)
6    game:GetService("MarketplaceService"):PromptGamePassPurchase(p,ITEM_ID)
7end)

Happy scripting!

Ad

Answer this question