UI Problem "Close Frame if Button clicked"

Hello good morgen. I create at the moment a little game. With levels. I made a script if a player click on the level he automatically teleport to the level point. It works. How can I create a script if the player clicks on the level button that are the mainframe are closed?

I uploadet on youtube a video.

this is my script

Can someone help me to create a script if the player clicks on the level1, level 2 … level button then the mainfram automatically closed too?

nice day
sebastian

maybe underneath this line add something like:

gui.Visible = false

1 Like

thank you this worked :smiley:

1 Like