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

Why won't this GUI disappear after a set amount of time?

Asked by 6 years ago
Edited 6 years ago

I am trying to make an intro thing where there is a GUI, but it isn't going away and it's really starting to annoy me. Heres the script:

game.Workspace.Intro.Playing = true
wait(34)
game.Workspace.Intro.Playing = false
game.StarterGui.ScreenGui.Frame.Visible = false
game.StarterGui.ScreenGui.Frame.ImageLabel.Visible = false
wait()
workspace.Water.Playing = true
workspace.Music.Playing = true
game.StarterGui.ScreenGui2.ImageLabel.Visible = true

Also, the ImageLabel won't appear and It's getting on my nerves. Thanks if you can help, also I'm a bit of a noob so please go easy on me!

0
Also, btw the first two GUIs are set on visible at the start, so it isn't script activated. CaptainAlien132 225 — 6y
0
What is up with that random "wait()"? I don't understand what your code is doing here, could you please post more of it so I can answer your question? T0XN 276 — 6y

1 answer

Log in to vote
1
Answered by
cailir 284 Moderation Voter
6 years ago
Edited 6 years ago

Hello, CaptainAlien132!

I found a error on the script, here is the fix: (LOCAL SCRIPT)

game.Workspace.Intro.Playing = true
wait(34)
game.Workspace.Intro.Playing = false
game.Players.LocalPlayer.PlayerGui.ScreenGui.Frame.Visible = false
game.Players.LocalPlayer.PlayerGui.ScreenGui.Frame.ImageLabel.Visible = false
wait()
workspace.Water.Playing = true
workspace.Music.Playing = true
game.Players.LocalPlayer.PlayerGui.ScreenGui2.ImageLabel.Visible = true

If you edit game.StarterGui.ScreenGui you will edit the gui that is cloned to the player when they join, so we edit the gui that is inside the player.

0
Thanks, just a heads up it shouldn't be a local script, but other than that it worked fine. Thanks! :) CaptainAlien132 225 — 6y
1
No problem cailir 284 — 6y
Ad

Answer this question