Dev product script not working

local mps = game:GetService("MarketplaceService")

script.Parent.Activated:Connect(function(p)
	print("e")
	mps:PromptProductPurchase(p, 1162625001)
end)

It’s a localscript, and the parent is a surface gui text button that is active, and if you hover over it… it has an effect. It won’t print e, or prompt the purchase. I haven’t used dev products in a while, so I’m not sure what the issue is.

2 Likes

Can’t you just- Get the Player using game.Players.LocalPlayer instead of having to use the Activated Event? Idk if there are any parameters in that event, and you said it’s a localscript so you’re able to access the Local Player if you do desire to wish so

1 Like

I know you can use local player, but what I did is practically the same thing. It would probably be more efficient if I used local player.

Well, if it didn’t print out e then it’s probably something relevant to your Activated Event

Could you try doing MouseButton1Click instead?

I’d tried before and it doesn’t work. I’m used to using .Activated, for billboard gui’s and surface gui’s.

Could you make sure that the Zindex property is higher than every other GUI/Frame’s?

I’d checked as well, but I’d solved the problem just now. Found out, that to make the buttons work you need to put the gui in starer gui and adornee it to the part. Thanks for the assistance although.

1 Like

Ah, it happens though at least you got the issue fixed