Can you help me with selling Dev Products? I made my products I just need a script that sells them. I am using a surface GUI and am trying to sell player points.

here's a script that doesn't work:

local buyButton = script.Parent local productId = 20139068 local Plr = script.Parent.Parent

buyButton.MouseButton1Click:connect(function() Game:GetService("MarketplaceService"):PromptProductPurchase(Plr, productId) end)

local MarketplaceService = Game:GetService("MarketplaceService")

MarketplaceService.PromptProductPurchaseFinished:connect(function(userId, productId, isPurchased) if isPurchased then

end end)

6 comments

0

Well, in my opinion, I wouldn't use a Surface gui because it's hard to get a path that leads to a player. Your path to the player would be used for regular Screen GUIs. I suggest using a ClickDetector and a brick because I've spent hours trying to figure out how to do it with Surface GUIs, but no luck.

0

So the script could work, just on a Screen GUI?

0

Yes.

0

Also, can the owner purchase the items?

0

Yes. All users, including the owner and ROBLOX Admins are eligible to purchase Developer products.

0

The script isnt working