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

I'm trying to make a GUI that you can buy game-passes off, but it isn't working. Help?!

Asked by 5 years ago

Hi, I am currently needing help because I'm scripting a GUI.

I've put this script into a normal script, and in button.


local gamepassid = 5039620 local player = game.Players.LocalPlayer function onClick() game:GetService("GamePassService"):PromptPurchase(player, gamepassid) end script.Parent.MouseButton1Click:connect(onClick)

I've changed it from "MarketPlaceService" to "GamePassService" because MarketPlace would bring up Models and games not the actual gamepass. Now the button will do nothing.

Help me please.

Here was the past script btw.


local gamepassid = 5039620 local player = game.Players.LocalPlayer function onClick() game:GetService("MarketPlaceService"):PromptPurchase(player, gamepassid) end script.Parent.MouseButton1Click:connect(onClick)
1
put it in a local script 0_Halloween 166 — 5y
0
I agree with celcinschi and also use :Connect as :connect is deprecated! AswormeDorijan111 531 — 5y
0
Still didn't work. Starnamics 24 — 5y

Answer this question