How to make a GUI disappear when a button is clicked

It’s still not working.
image

Also anyone know who it is putting the Start UI in [""]?

image

@yLocaI @rottendogDkR @BawTheSeal

it is because you didnt put frame.visible = true. also i recommend renaming these frame name to different so it works. just not same frame name. how is it supposed to close it and open another when frame names are same when you put in?

What do you mean by frame???

You were supposed to use enabled and not visible since it is a gui and not a frame.

Do you just need the GUI transparent or destroyed/deleted?

image

HWYYYY NOOWW!!!

thats default name that they make it to when you make a frame and it says that “frames” so i recommended to name these frame name to different and put the frames name to the frame name that you name it to. so it works. just like.

Frame.Visible = false

Wrong. :x: Now onto another script:

Frame.Visible = false
Frame.Visible = true

Wrong again. :x: Onto another script.

YourFrameName(notsupposedtobesame).Visible = false
YourFrameName(notsupposedtobesame).Visible = true

Correct. right. :white_check_mark:

1 Like

But why u talking about frames? My script is disable the screen UI?

1 Like

to disable your Gui screen right.

this is what you mean?

You should get PlayerGui instead of StarterGui. Everything inside StarterGui clones into player’s PlayerGui when player joins to the game and player is seeing PlayerGui, not StarterGui.

Yes that is what I was thinking

1 Like

use visible but u just do if the script is in the button

local frame = script.Parent.Parent:WaitForChild("Frame")
2 Likes

Okay. before i edit script again. im gonna get some info so i can make sure if it works. Do you have 1 frames or screen gui being visible and another 1 frames or screengui being not visible?

Also do that what they said. @LifeDigger

image

1 Like

OMG I am soooo confused lol. :frowning:

Can you show your script again?

What do u want me to show u?? I have changed it soo much from my old script and nothing works. All I have been given is confusion

That’s why i asked. Can you show it so i can see what you’re doing wrong if you’re doing something wrong.

To be honest I have no clue anymore

local frame = script.Parent.Parent:WaitForChild("Frame")

local wow = script.Parent

wow.MouseButton1Click:Connect(function()

frame.Visible = false

end)