Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

Why doesn't this productid work?

Asked by 9 years ago
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?

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. :/ TheeDeathCaster 2368 — 9y
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 alphawolvess 1784 — 9y
0
Thank you! iiCasual 20 — 9y

1 answer

Log in to vote
1
Answered by
Shawnyg 4330 Trusted Badge of Merit Snack Break Moderation Voter Community Moderator
9 years ago

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.

Ad

Answer this question