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)
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.
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?