I’m making a GUI for my game so you can buy certain passes or products, using a simple script.
local mps = game:GetService("MarketplaceService")
local lp = game.Players.LocalPlayer
local btn = script.Parent
btn.MouseButton1Click:Connect(function()
mps:PromptGamePassPurchase(lp.UserId,12437336)
end)
It just errors “Unable to cast value to object”