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 10 years ago

Here's the script:

Player = game.Players.LocalPlayer
local Vip = 158447540

script.Parent.MouseButton1Click:connect(function()
    game:GetService("MarketplaceService"):PromptPurchase(Player, Vip)
end)

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
10 years ago

Go to playergui and make add the following in order

ScreenGui

Frame

TextButton

Player = script.Parent.Parent.Parent.Parent.Parent.Parent -- Put this script in TextButton
local Vip = 158447540

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

0
i play it with my account nd it still doesnt work 951753lolguy 2 — 10y
Ad
Log in to vote
-2
Answered by
Goulstem 8144 Badge of Merit Moderation Voter Administrator Community Moderator
10 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