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

Game pass Text button surface gui!?!?! Please someone help?!?!?!? [closed]

Asked by 8 years ago

I'm trying to make a Text button on a surface Gui that tells the person to buy a gamepass and this script I have doesn't work... It's in a local script I don't know what to do...

local player=game.Players.LocalPlayer
local gamepassId=483446658

function Click()
    game:GetService("MarketplaceService"):PromptPurchase(player, gamepassId)
end

script.Parent.MouseButton1Click:connect(Click)

Marked as Duplicate by InfinitivePixelsJr, General_Scripter, and User#6546

This question has been asked before, and already has an answer. If those answers do not fully address your question, then please ask a new question here.

Why was this question closed?

1 answer

Log in to vote
0
Answered by 8 years ago

The surfacegui needs to be in the StarterGui and you need to set the Adornee to the brick that you want it to display on.

0
What do I need to do? TakenGoomig 0 — 8y
0
You need to put your surfacegui in StarterGui and run this in the command bar "game.StarterGui.SurfaceGui.Adornee = workspace:FindFirstChild("Whatever part you want it on");" and that will make it so that you can change it from inside the startergui and the players can click it MrLonely1221 701 — 8y
0
Its not working ;-; TakenGoomig 0 — 8y
0
That just made it so I could type in the box I want it so the user can press on the buy vip button and its tells them to buy it. TakenGoomig 0 — 8y
View all comments (4 more)
0
GOT IT TakenGoomig 0 — 8y
0
Thanks so much! I've been looking everywhere! TakenGoomig 0 — 8y
0
No problem. I had this same problem a year back and when I finally found out how to do it I felt stupid. xD MrLonely1221 701 — 8y
0
xD I do feel stupid that its that simple... Well I'm new to scripting. Thanks again! TakenGoomig 0 — 8y
Ad