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

Why does this MarketplaceService script not work?

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

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)

1 comment

0

i play it with my account nd it still doesnt work

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

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