I have a bit of basic code to enable players to purchase a gamepass in-game. The code below is in a script inside a click detector.

function onMouseClick(player)
if player.UserId >0 then
local MarketplaceService = game:GetService("MarketplaceService")
local productId = 326358490
MarketplaceService:PromptPurchase(player, productId)
end
end
script.Parent.MouseClick:connect(onMouseClick)

This all works fine, and displays the GUI saying that I already have purchased the gamepass. However, when you try to click OK to remove the message, it doesn't remove. Is this due to my script or a ROBLOX core script? I'd appreciate any help.

3 comments

0

That's weird xD

0

Works perfectly fine with my game... Here's the link it's just a practice that I tried the game on. http://www.roblox.com/games/365503963/Practice

0

Thanks KingLoneCat, I just tried out your example yet for me clicking OK still does nothing. I guess it must be my computers fault!