Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Why doesn't this productid work?

local productId = 22933009
local player = game.Players.LocalPlayer

script.Parent.MouseButton1Click:connect(function()
	game:GetService("MarketplaceService"):PromptProductPurchase(player, productId)
end)

Did roblox studio break this script?

3 comments

1

I tried this type of code before as well; Apparently, you have to use a 'Server-Sided' script to beable to send a 'PromptProduct' purchase. :/

0

I really have problems with Dev products to. I can't even do them right so I've been holding it off. Check this place out for an examble by Urist: http://www.roblox.com/games/147965737/Developer-Product-Sample

0

Thank you!

1 answer

✓ Accepted answer

As said by Stigma, instead of having it as a Local Script, make it a Server-Sided script. To define the player, You'd need to keep adding ".Parent" until you reach the parent of the PlayerGui.

This discussion is preserved as it was. New answers, comments, and votes are closed.