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

GUI Server script for TUTORIAL only working a tiny bit?

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

3 comments

0

If you took this from a model in the catalog please send the link so I can look at the guis too. Also, are you sure the GUIs are in the right place?

0

They are in the same place, and no, I made the script myself.

2 answers

✓ Accepted answer

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"

2 comments

1

Thanks! Now it's working!

0

Please don't forget to accept this answer and upvote please :)

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

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