Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Can't figure this script out?

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 comment

1

Why do you need to use the player's playergui if the script is already in the player's gui?

4 answers

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.

1 comment

0

It doesn't work for me and everything is in the right place. I'm not the problem, simple as that.

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


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.

This discussion is preserved as it was. New answers, comments, and votes are closed.