Hello, I am trying to make a tutorial for a game, but it is not working? Only the first GUI appears but it doesn't disappear and no other GUIs disappear. This is in Workspace and it is a server script.
-- Defining the variables local Bridge = game.StarterGui.ScreenGui.one local Danger = game.StarterGui.ScreenGui.two local Hen = game.StarterGui.ScreenGui.three -- Code wait(0.1) Bridge.Visible = true wait(5) Bridge.Visible = false Danger.Visible = true wait(5) Danger.Visible = false Hen.Visible = true wait(5) Hen.Visible = false
Alright. As all the things in StarterGui get placed to players personal Gui folder you need to include the script in the ScreenGui. You also need to change the variables. Here is the script.
-- Defining the variables local Bridge = script.Parent.one --Changed it to find it from the parent. local Danger = script.Parent.two local Hen = script.Parent.three -- Code wait(0.1) Bridge.Visible = true wait(5) Bridge.Visible = false Danger.Visible = true wait(5) Danger.Visible = false Hen.Visible = true wait(5) Hen.Visible = false
So you will have to replace the current script with the one above and move it to "ScreenGui"
You should put the script in the StarterGui to make it simpler for the Local variables. like so... It was possibly the placement itself, but from what I did it seems to work perfectly so I suggest when trying to do something like this put the ServerScript in the Frames Parent (a.k.a ScreenGui) If this helped you please upvote!
----[|Script|]----
local Bridge = script.Parent.one local Danger = script.Parent.two local Hen = script.Parent.three wait(0.1) Bridge.Visible = true wait(5) Bridge.Visible = false Danger.Visible = true wait(5) Danger.Visible = false Hen.Visible = true wait(5) Hen.Visible = false