Welcome to the Forums!
Join thousands of other Roblox members with a free account.
Create Forum Account

Making a GUI Disappear, and another Appear?

  • This website was created by Roblox members to replace the official forums (because Roblox shut them down) Join us if you like Roblox!

kitty20

New Member
Reputation: 0 / 0 / 0
Nov 7, 2021
7
1
3
Roblox
kitty2_0
I've made a script that make a GUI disappear and another appear in it's place. It seems to work fine except for one thing.
The previous GUI is not un-enabling when the second GUI enables. It seems that the highlighted code isn't going to the correct path.
Any help would be appreciated.

1637847828012.png
^ Highlighted part and objects above ^
 

matieo33

Top 0.0001% Member
Reputation: 1 / 0 / 0
Jun 8, 2018
2,205
9
714
113
Poland, Warsaw
Roblox
matieo33
Discord
Matieo33#8953
What if you try using the Visible property for it's children instead?
Post automatically merged:

What if you try using the Visible property for it's children instead?
Actually my bad, I believe it's that you can't go looking for it by using game.StarterGUI.ScreenGui1.Enabled = false
Try doing this instead:
lua:
script.Parent.Parent.ScreenGui1.Enabled = false
 
Last edited:
  • Like
Reactions: kitty20

ElHomburgerGuy

If you won't let yourself fail, you won't improve
Reputation: 5 / 0 / 1
Apr 24, 2019
6,713
24
2,631
113
Anonymous in the USA
Roblox
PieroWasTaking
The property is Enabled and not Visible but why are you using all those GUIs? One is enough to have all the text labels in.
Thank you so much for that idea of just changing the text, that works so much better. It is less awkward to look at and more organized. Could I even combine all of the scripts??
You could, just make sure the Variables line up with each other properly.
 
  • Wow
Reactions: kitty20

kitty20

New Member
Reputation: 0 / 0 / 0
Nov 7, 2021
7
1
3
Roblox
kitty2_0
What if you try using the Visible property for it's children instead?
Post automatically merged:

What if you try using the Visible property for it's children instead?
Actually my bad, I believe it's that you can't go looking for it by using game.StarterGUI.ScreenGui1.Enabled = false
Try doing this instead:
lua:
script.Parent.Parent.ScreenGui1.Enabled = false
This didn't seem to work, but I took ElHomburgerGuy's advice and used just one GUI, it works great!
Post automatically merged:

The property is Enabled and not Visible but why are you using all those GUIs? One is enough to have all the text labels in.
Thank you so much for that idea of just changing the text, that works so much better. It is less awkward to look at and more organized. Could I even combine all of the scripts??
You could, just make sure the Variables line up with each other properly.
Success! It all works in one script. I definitely learned something today lol.
 

ElHomburgerGuy

If you won't let yourself fail, you won't improve
Reputation: 5 / 0 / 1
Apr 24, 2019
6,713
24
2,631
113
Anonymous in the USA
Roblox
PieroWasTaking
What if you try using the Visible property for it's children instead?
Post automatically merged:

What if you try using the Visible property for it's children instead?
Actually my bad, I believe it's that you can't go looking for it by using game.StarterGUI.ScreenGui1.Enabled = false
Try doing this instead:
lua:
script.Parent.Parent.ScreenGui1.Enabled = false
This didn't seem to work, but I took ElHomburgerGuy's advice and used just one GUI, it works great!
Post automatically merged:

The property is Enabled and not Visible but why are you using all those GUIs? One is enough to have all the text labels in.
Thank you so much for that idea of just changing the text, that works so much better. It is less awkward to look at and more organized. Could I even combine all of the scripts??
You could, just make sure the Variables line up with each other properly.
Success! It all works in one script. I definitely learned something today lol.
I would recommend you mark any of the comments here as a solution then, to notify anyone else that your issue is solved.