I created a terms and agreement GUI and I wanted it to show up after 5-10 seconds after a player (or me) joins. I took a wild guess while attempting to make it work, but it didn't. Here's my wild wild guess:
while true do script.Parent.Parent.Visible = false wait(12) script.Parent.Parent.Visible = true end
Apparently, the local script is inside the Frame of the ScreenGUI.
You're using a while loop with no break between true and false, this means that the gui is changing it back to false before it is even noticable that is is visible to the human eye.
try doing it without the loop
frame = script.Parent.Parent --what you want to be visible frame.Visible = false wait(12) frame.Visible = true
Okay, somehow I solved my own question, haha. Marolex's suggestion didn't work for some reason. Marolex's suggestion
frame = script.Parent.Parent --what you want to be visible frame.Visible = false wait(12) frame.Visible = true
I then got an error when I was testing: 03:54:51.416 - Something unexpectedly tried to set the parent of Rules and Terms to NULL while trying to set the parent of Rules and Terms. Current parent is PlayerGui.
I knew right away that something HAS to be the parent of "Rules and Terms". This is it:
frame = script.Parent.Frame --what you want to be visible frame.Visible = false wait(12) frame.Visible = true
frame = script.Parent.Parent was defining itself and caused a nil to occur. frame = script.Parent.Frame was defining the frame to appear.