I have a screen GUI with a text box and it won't close with this script: [AS IN IT DOES NOT WORK]
1 | 1 player = script.Parent.Parent |
2 | 2 |
3 | 3 wait( 5 ) |
4 | 4 player.PlayerGui.GUI 1. Frame.Visible = false |
5 | 5 player.PlayerGui.GUI 2. Frame.Visible = true |
That won't close the screengui with the textbox.
well the thing you might did wrong is you forgot a few things one you didn't tell it to CLOSE it and two is it true or false?
Tested in studio, works just fine. You probably don't have the GUI elements in the right places.
Try this:
1 | player = script.Parent.Parent |
2 |
3 | wait( 5 ) |
4 |
5 | player.PlayerGui.GUI 1. Frame.Visible = false |
6 | wait( 5 ) --5 is 5 seconds! Change the delay to whatever fits your needs! |
7 | player.PlayerGui.GUI 2. Frame.Visible = true |
The problem is that there is no wait() between setting the frame.visible true and setting it to false, so you're basically making it turn invisible and visible in one frame.