Click GUI to Open GUI

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    Hey all! I haven’t developed for about 6 months now, so I need some help! I am trying to make a GUI that opens a GUI when you press it. So basically I will click a TextButton which opens a frame.
  2. What is the issue? Include screenshots / videos if possible!
    I need someone to analyze this script and see what I should add to it to make it happen.
  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    I have looked for solutions on YouTube but it only shows “Make GUI Pop Up by clicking Part” So a tutorial from youtube would be nice!
    After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
function leftClick()
script.Parent.AnyOtherParentsYouNeed.NameOfGui
end

script.Parent.MouseButton1Click:Connect(leftClick)

<— This shows the GUI i want to press.

<----- This is what I want to appear

5 Likes

I’ll try, it thank you for replying! :smiley:

2 Likes

why did you put Parent 5 times?

3 Likes

cause if you just go game.StarterGui.Shop.ShopFrame.Visible = true then it won’t pop up. (unless you use playerGui instead)

2 Likes

It says “Shop is not a valid member
of player” in the output when I press the TextButton

2 Likes

You should probably put the text button in the same gui as the shop to make it less confusing.

2 Likes

Remove one parent (There should only be 4 now)

2 Likes

Ok I’ll do both of those, @soccervr you mean putting the textbutton into the GUI that is meant to pop up?

2 Likes

Like this:

       '''
        script.Parent.MouseButton1Click:Connect(function()
               script.Parent.Parent.Parent.Parent.Parent.Shop.ShopFrame.Visible = true
       end)

           '''
1 Like

Now it says “ShopFrame is not a valid member of ScreenGUI”

1 Like

Remove one more… (I’m so stupid lol)

1 Like
   '''
    script.Parent.MouseButton1Click:Connect(function()
           script.Parent.Parent.Parent.Shop.ShopFrame.Visible = true
   end)

       '''
1 Like

oh god now its says “Shop is not a valid member of ScreenGui”

1 Like

You know what:

        '''
           script.Parent.MouseButton1Click:Connect(function()
                   game.Players.LocalPlayer:WaitForChild('PlayerGui').Shop.ShopFrame.Visible = true
            end)

              '''

Sorry for me being stupid

lol connect was spelt connct :wink:

BRUH NOW ITS SHOPFRAME iS noT a valid member of ScreenGui

The local script is a child of a text button correct?

yeah it currently is…

if theres a youtube video can you send it to me?

How did screen gui get there anyway? (In the error) Also, which line?