So I was able to write a quick GUI up that prompts a player to purchase a gamepass if they click it.
local productId = 0
local player = game.Players.LocalPlayer
script.Parent.MouseButton1Click:connect(function()
Game:GetService("MarketplaceService"):PromptPurchase(player, productId)
end)
The problem is, if you already own it, or if you try to click "Purchase" or "cancel," the ROBLOX GUI won't go away, instead I just keep clicking Ok and it stays on the screen. Reseting does not fix the problem. Anybody know what may be causing this? |