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

Why does this MarketplaceService script not work?

Asked by 11 years ago

Here's the script:

1Player = game.Players.LocalPlayer
2local Vip = 158447540
3 
4script.Parent.MouseButton1Click:connect(function()
5    game:GetService("MarketplaceService"):PromptPurchase(Player, Vip)
6end)

So there isn't any errors and it doesn't work. Please HELP!!! Thanks.

2 answers

Log in to vote
0
Answered by
HexC3D 830 Moderation Voter
11 years ago

Go to playergui and make add the following in order

ScreenGui

Frame

TextButton

1Player = script.Parent.Parent.Parent.Parent.Parent.Parent -- Put this script in TextButton
2local Vip = 158447540
3 
4script.Parent.MouseButton1Click:connect(function()
5    game:GetService("MarketplaceService"):PromptProductPurchase(Player, Vip)
6end)
0
i play it with my account nd it still doesnt work 951753lolguy 2 — 11y
Ad
Log in to vote
-2
Answered by
Goulstem 8144 Badge of Merit Moderation Voter Administrator Community Moderator
11 years ago

What does this have to do with game passes? And this must be a localscript.. if it still won't work then get the player by going 1 parent out of the workspace.

Hope Helped

+1

Answer this question