✓ Accepted answer
###Gamepasses vs Assets
Over the summer, roblox changed how gamepasses work. They made them their own seperate entity, rather then an asset. This means that they had to create new methods, and tinker old ones. This is included here.
PromptPurchase takes an Asset Id (Hat, gear, etc). Instead, we must use a new method calledPromptGamePassPurchase
###Deprecated Code
connect is deprecated. Instead, use Connect
The 2nd parameter of Instance.new(X, Y) (the Y), is deprecated. Instead use .Parent.
###Solution
local CLICK_BLOCK = script.Parent
local ITEM_ID = 5347758
local Click = Instance.new("ClickDetector")
Click.Parent = CLICK_BLOCK
Click.MouseClick:Connect(function(p)
game:GetService("MarketplaceService"):PromptGamePassPurchase(p,ITEM_ID)
end)
##Wiki Links
PromptGamePassPurchase
3 comments
I made sure the id was right, and it still doesnt work.
try configuring the Item, making sure that it is for sale
I did that a lot, and its a gamepass.