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

Why won't this GUI show up?

Asked by 9 years ago

Ok so I'm making a game called Trivia Mania. I made a few GUIs for it to make it look more professional. The problem is I can't get one of my GUIs to show up. It's called Introframe. It's supposed to show up for a few seconds then it disappears. Here's the script:

game.StarterGUI.TrivManGUI.Ruleframe.Visible = false 
game.StarterGUI.TrivManGUI.Htpframe.Visible = false
game.StarterGUI.TrivManGUI.Introframe.Visible = true -- This is the GUI I'm talking about.
game.StarterGUI.TrivManGUI.Introframe.TextBox.Text = "Welcome to Trivia Mania!"
wait(2.5)
game.StarterGUI.TrivManGUI.Introframe.TextBox.Text = "Now loading..."
wait(5)
game.StarterGUI.TrivManGUI.Introframe.Visible = false -- The Introframe disappears here.
game.StarterGUI.TrivManGUI.Ruleframe.Visible = true
game.StarterGUI.TrivManGUI.Htpframe.Visible = true

See what I mean? Ok. My question is, where did I go wrong? And for your information, I'm using a regular script, not a Module or Local script.

1 answer

Log in to vote
2
Answered by
Shawnyg 4330 Trusted Badge of Merit Snack Break Moderation Voter Community Moderator
9 years ago

Your problem is that your changing it in StarterGui!! Not the PlayerGui, which is where all the GUIs for a Player is stored. Put a normal script directly in the GUI, with the following:

script.Parent.Ruleframe.Visible = false 
script.Parent.Htpframe.Visible = false
script.Parent.Introframe.Visible = true -- This is the GUI I'm talking about.
script.Parent.Introframe.TextBox.Text = "Welcome to Trivia Mania!"
wait(2.5)
script.Parent.Introframe.TextBox.Text = "Now loading..."
wait(5)
script.Parent.Introframe.Visible = false -- The Introframe disappears here.
script.Parent.Ruleframe.Visible = true
script.Parent.Htpframe.Visible = true
0
Are you saying to put it into the PlayerGUI? Speaking of PlayerGUIs, where is the PlayerGUI? VCRaygamma 15 — 9y
0
@VCRayGamma I'm saying to put the script into the Screen Gui. Player Gui can only be seen in a server. In studio, you can click the test tab, then hit play. Look into the Player, and you'll see PlayerGui Shawnyg 4330 — 9y
Ad

Answer this question