How would I make a tutorial GUI

Well I deleted my scripts and am re-writing them.

1 Like

So my script that is supposed to change the text is here:

TextTable = {"Welcome to Vaccine Simulator!","Buy and sell vaccines to save the world","blah blah 3"}
TutorialStep = 1
script.Parent.Parent.TutorialText.Text = TextTable[TutorialStep]
script.Parent.MouseButton1Click:Connect(function()
TutorialStep = TutorialStep + 1
    script.Parent.Parent.TutorialText.Text = TextTable[TutorialStep]
end)

and my script that opens the tutorial is here:

script.Parent.MouseButton1Down:Connect(function()

	script.Parent.Parent.TutorialFrame.TutorialText.Text = "Hello, welcome to Vaccine Simulator!"
	script.Parent.Parent.TutorialFrame.Visible = true
end)

Everything is working but now I am still stuck at the point that when I close it then re-open it its still at the last frame. I cannot make it so TutorialStep = 1 in another script because they are two different scripts and only one defines TutorialStep.

1 Like

And I might just make it all in the same script if this cannot work.

1 Like

I would honestly just make it all into one script. It would take like 30 seconds to combine them, and it would solve a bunch of your issues.

1 Like

Alright, when I am done I will reply what the result is, happy scripting!

2 Likes

I am a bit confused (Because I am a rookie scripter) On what to do :confused:
edit: I think I figured it out

1 Like

Is something wrong here?

script.Parent.MouseButton1Down:Connect(function()
TutorialStep = 1
	script.Parent.Parent.TutorialFrame.TutorialText.Text = "Hello, welcome to Vaccine Simulator!"
	script.Parent.Parent.TutorialFrame.Visible = true
end)

TextTable = {"Welcome to Vaccine Simulator!","Buy and sell vaccines to save the world","blah blah 3"}
TutorialStep = 1
script.Parent.Parent.TutorialText.Text = TextTable[TutorialStep]
script.Parent.Parent.TutorialFrame.Next.MouseButton1Click:Connect(function()
TutorialStep = TutorialStep + 1
    script.Parent.Parent.TutorialText.Text = TextTable[TutorialStep]
end)

edit: No errors
edit2: Fixed, Happy scripting :smiley:

3 Likes

Glad we were able to figure it out! Nice job combining the scripts :smile:.

1 Like

Thanks, I have learned a lot from you!
(I sent you a friend request incase you wanna be friends, feel free to accept it)

1 Like