Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Gamepass purchase prompts the wrong gamepass?

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

✓ Accepted answer

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!

This discussion is preserved as it was. New answers, comments, and votes are closed.