so i made this gamepass script
local cleanSweepId = --Basically, you put the ID of the gamepass as the value.
script.Parent.ClickDetector.MouseClick:connect(function(player) Game:GetService("MarketplaceService"):PromptPurchase(player, cleanSweepId) end)
but when i type in an id its not a gamepass id anything i need to do with the id or the script?

2 comments
Gamepasses need a separate method named PromptGamePassPurchase https://developer.roblox.com/en-us/api-reference/function/MarketplaceService/PromptGamePassPurchase
OH TYSM