New: Nitro Boost our Discord server and receive full donation perks here on the website! Join the Scripting Helpers Discord Server to learn more! You can also Support on Patreon as always.
Still have questions? Join our Discord server and get real time help.
Log in to vote

Make a button show when another button is pressed and a player owns a certain gamepass?

Asked by 3 months ago

So recently, I've been trying to make a game that includes paid characters you can be. Once you press play, a character GUI will show. All the characters have a 'Buy' button under that character and I need it if you own a certain gamepass, a play button will show under the Buy button, I can script the last part of making that character being played and I can put the button in the correct place. I just need it when a player presses the Start button, a GUI will show and if a player own that certain gamepass, the button will show with Play.

(I'm not good with GUIs at all xD)

1 answer

Log in to vote
Answered by 3 months ago

This sbould work I think. Good luck!

local passid = 0000000 -- Pass ID
    if game:GetService("MarketplaceService"):PlayerHasPass(player, passid) then
    game.StarterGUI.ScreenGUINameHere.FrameNameHere.ButtonNameHere.Visible = true
    game:GetService("MarketplaceService"):PromptPurchase(player, passid)
    game.StarterGUI.ScreenGUINameHere.FrameNameHere.ButtonNameHere.Visible = false
It doesnt work, ive tried chnaging it and chnaging the script type. But Ive got no where. Sorry. DiamondRules01 7 — 3mo
hmmmmm, maybe put the local passid above the script.Parent.MouseButton1Click function? PurpleProgram 42 — 3mo

Answer this question