Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Can't figure this script out?

Asked by 9 years ago

I have a screen GUI with a text box and it won't close with this script: [AS IN IT DOES NOT WORK]


1 player = script.Parent.Parent 2 3 wait(5) 4 player.PlayerGui.GUI1.Frame.Visible = false 5 player.PlayerGui.GUI2.Frame.Visible = true

That won't close the screengui with the textbox.

1
Why do you need to use the player's playergui if the script is already in the player's gui? Bman8765 270 — 9y

4 answers

Log in to vote
0
Answered by 9 years ago

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?

Ad
Log in to vote
0
Answered by
Mr_Octree 101
9 years ago

Tested in studio, works just fine. You probably don't have the GUI elements in the right places.

0
It doesn't work for me and everything is in the right place. I'm not the problem, simple as that. freshieman 0 — 9y
Log in to vote
0
Answered by 9 years ago

Try this:

player =  script.Parent.Parent

wait(5)

player.PlayerGui.GUI1.Frame.Visible =  false
wait(5)    --5 is 5 seconds! Change the delay to whatever fits your needs!
player.PlayerGui.GUI2.Frame.Visible =  true


Log in to vote
-2
Answered by 9 years ago

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.

Answer this question