The error is: Unable to cast Instance to int64 Script:
local ms = game:GetService(“MarketplaceService”) local id = 13589927 script.Parent.MouseButton1Click:Connect(function() ms:PromptGamePassPurchase(id, game.Players.LocalPlayer) end)
I’m using a GUI Textbutton to prompt a game pass purchase.
You need to do it the other way. The first Value is the Player, the second the ID. So just do:
local ms = game:GetService(“MarketplaceService”) local id = 13589927 script.Parent.MouseButton1Click:Connect(function() ms:PromptGamePassPurchase(game.Players.LocalPlayer, id) end)