If you click the button when its parent is a ScreenGui, it actually does something. I put it into a surface gui and then it is unresponsive when clicked. It's very strange, I haven't seen anything like this.

local mps = game:GetService("MarketplaceService")
local gamepass_id = 6125834
script.Parent.MouseButton1Click:connect(function()
local player = game.Players.LocalPlayer
mps:PromptGamePassPurchase(player, gamepass_id)
end)
mps.PromptGamePassPurchaseFinished:connect(function(player, id, purchased)
if id == gamepass_id and purchased then
game.ReplicatedStorage.Give:FireServer()
	end
end)

I feel like I have been trying to fix this WAYY too long. Does anyone know the solution?

2 comments

2

Is your SurfaceGui parented to StarterGui/PlayerGui? If you put it directly under a part, interacting with the GUI won’t work. Try putting it in StarterGui then set its adornee property to the part.

0

Oh sweet! it actually did work. I tried doing that a different way from someone else. I was a bit confused on how they worded it.