A little help on a few of my codes. I did follow a tutorial and i am doing it right but still dont work

You can write your topic however you want, but you need to answer these questions:

  1. Trying to get multiple GUI’s to open. like if i click one it opens one if i click another one it hides the other one and opens that one if i click the gui the other gui should go away

  2. What is the issue? When I click it refuses to open or does not

  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    Yes I looked on dev hub and found this How to make a Gui with multiple tabs on roblox studio! (Roblox Scripting Tutorial) - YouTube I been following it but with my own guis and i added a bit to it. Can someone help me I am not that good at coding/scripting

After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!

I have 8 codes for you to look at and ill be sending screenshots of stuff


what my GUI looks like. it is suppost to open what i boxxed on red. I will also send you my explorer tab.


where its shows in blue thats where it starts
I will send my 8 codes. they might look the same but for each one of them there is a true for the one thats suppost to be visible

Note 3

local mouse = script.Parent
local Notes3 = script.Parent.Parent.Parent.Parent.Notes3
local Notes4 = script.Parent.Parent.Parent.Parent.Notes4
local Notes5 = script.Parent.Parent.Parent.Parent.Notes5
local Notes6 = script.Parent.Parent.Parent.Parent.Notes6
local Notes7 = script.Parent.Parent.Parent.Parent.Notes7
local Notes8 = script.Parent.Parent.Parent.Parent.Notes8
local Notes9 = script.Parent.Parent.Parent.Parent.Notes9
local Notes10 = script.Parent.Parent.Parent.Parent.Notes10

mouse.MouseButton1Click:Connect(function()
	Notes3.Visible = true
	Notes4.Visible = false
	Notes5.Visible = false
	Notes6.Visible = false
	Notes7.Visible = false
	Notes8.Visible = false
	Notes9.Visible = false
	Notes10.Visible = false
end)

Note 4

local mouse = script.Parent
local Notes3 = script.Parent.Parent.Parent.Parent.Notes3
local Notes4 = script.Parent.Parent.Parent.Parent.Notes4
local Notes5 = script.Parent.Parent.Parent.Parent.Notes5
local Notes6 = script.Parent.Parent.Parent.Parent.Notes6
local Notes7 = script.Parent.Parent.Parent.Parent.Notes7
local Notes8 = script.Parent.Parent.Parent.Parent.Notes8
local Notes9 = script.Parent.Parent.Parent.Parent.Notes9
local Notes10 = script.Parent.Parent.Parent.Parent.Notes10

mouse.MouseButton1Click:Connect(function()
	Notes3.Visible = false
	Notes4.Visible = true
	Notes5.Visible = false
	Notes6.Visible = false
	Notes7.Visible = false
	Notes8.Visible = false
	Notes9.Visible = false
	Notes10.Visible = false
end)

Note 5

local mouse = script.Parent
local Notes3 = script.Parent.Parent.Parent.Parent.Notes3
local Notes4 = script.Parent.Parent.Parent.Parent.Notes4
local Notes5 = script.Parent.Parent.Parent.Parent.Notes5
local Notes6 = script.Parent.Parent.Parent.Parent.Notes6
local Notes7 = script.Parent.Parent.Parent.Parent.Notes7
local Notes8 = script.Parent.Parent.Parent.Parent.Notes8
local Notes9 = script.Parent.Parent.Parent.Parent.Notes9
local Notes10 = script.Parent.Parent.Parent.Parent.Notes10

mouse.MouseButton1Click:Connect(function()
	Notes3.Visible = false
	Notes4.Visible = false
	Notes5.Visible = true
	Notes6.Visible = false
	Notes7.Visible = false
	Notes8.Visible = false
	Notes9.Visible = false
	Notes10.Visible = false
end)

Note 6

local mouse = script.Parent
local Notes3 = script.Parent.Parent.Parent.Parent.Notes3
local Notes4 = script.Parent.Parent.Parent.Parent.Notes4
local Notes5 = script.Parent.Parent.Parent.Parent.Notes5
local Notes6 = script.Parent.Parent.Parent.Parent.Notes6
local Notes7 = script.Parent.Parent.Parent.Parent.Notes7
local Notes8 = script.Parent.Parent.Parent.Parent.Notes8
local Notes9 = script.Parent.Parent.Parent.Parent.Notes9
local Notes10 = script.Parent.Parent.Parent.Parent.Notes10

mouse.MouseButton1Click:Connect(function()
	Notes3.Visible = false
	Notes4.Visible = false
	Notes5.Visible = false
	Notes6.Visible = true
	Notes7.Visible = false
	Notes8.Visible = false
	Notes9.Visible = false
	Notes10.Visible = false
end)

Note 7

local mouse = script.Parent
local Notes3 = script.Parent.Parent.Parent.Parent.Notes3
local Notes4 = script.Parent.Parent.Parent.Parent.Notes4
local Notes5 = script.Parent.Parent.Parent.Parent.Notes5
local Notes6 = script.Parent.Parent.Parent.Parent.Notes6
local Notes7 = script.Parent.Parent.Parent.Parent.Notes7
local Notes8 = script.Parent.Parent.Parent.Parent.Notes8
local Notes9 = script.Parent.Parent.Parent.Parent.Notes9
local Notes10 = script.Parent.Parent.Parent.Parent.Notes10

mouse.MouseButton1Click:Connect(function()
	Notes3.Visible = false
	Notes4.Visible = false
	Notes5.Visible = false
	Notes6.Visible = false
	Notes7.Visible = true
	Notes8.Visible = false
	Notes9.Visible = false
	Notes10.Visible = false
end)

Note 8

local mouse = script.Parent
local Notes3 = script.Parent.Parent.Parent.Parent.Notes3
local Notes4 = script.Parent.Parent.Parent.Parent.Notes4
local Notes5 = script.Parent.Parent.Parent.Parent.Notes5
local Notes6 = script.Parent.Parent.Parent.Parent.Notes6
local Notes7 = script.Parent.Parent.Parent.Parent.Notes7
local Notes8 = script.Parent.Parent.Parent.Parent.Notes8
local Notes9 = script.Parent.Parent.Parent.Parent.Notes9
local Notes10 = script.Parent.Parent.Parent.Parent.Notes10

mouse.MouseButton1Click:Connect(function()
	Notes3.Visible = false
	Notes4.Visible = false
	Notes5.Visible = false
	Notes6.Visible = false
	Notes7.Visible = false
	Notes8.Visible = true
	Notes9.Visible = false
	Notes10.Visible = false
end)

Note 9

local mouse = script.Parent
local Notes3 = script.Parent.Parent.Parent.Parent.Notes3
local Notes4 = script.Parent.Parent.Parent.Parent.Notes4
local Notes5 = script.Parent.Parent.Parent.Parent.Notes5
local Notes6 = script.Parent.Parent.Parent.Parent.Notes6
local Notes7 = script.Parent.Parent.Parent.Parent.Notes7
local Notes8 = script.Parent.Parent.Parent.Parent.Notes8
local Notes9 = script.Parent.Parent.Parent.Parent.Notes9
local Notes10 = script.Parent.Parent.Parent.Parent.Notes10

mouse.MouseButton1Click:Connect(function()
	Notes3.Visible = false
	Notes4.Visible = false
	Notes5.Visible = false
	Notes6.Visible = false
	Notes7.Visible = false
	Notes8.Visible = false
	Notes9.Visible = true
	Notes10.Visible = false
end)

Note 10

local mouse = script.Parent
local Notes3 = script.Parent.Parent.Parent.Parent.Notes3
local Notes4 = script.Parent.Parent.Parent.Parent.Notes4
local Notes5 = script.Parent.Parent.Parent.Parent.Notes5
local Notes6 = script.Parent.Parent.Parent.Parent.Notes6
local Notes7 = script.Parent.Parent.Parent.Parent.Notes7
local Notes8 = script.Parent.Parent.Parent.Parent.Notes8
local Notes9 = script.Parent.Parent.Parent.Parent.Notes9
local Notes10 = script.Parent.Parent.Parent.Parent.Notes10

mouse.MouseButton1Click:Connect(function()
	Notes3.Visible = false
	Notes4.Visible = false
	Notes5.Visible = false
	Notes6.Visible = false
	Notes7.Visible = false
	Notes8.Visible = false
	Notes9.Visible = false
	Notes10.Visible = true
end)

what am I doing wrong here to make it not work

1 Like

First of all idk what tutorial you’re using, but all those scripts need to go and be condensed to 1. Secondly from what the pictures are showing you have too many parents in the script. You say you followed the tutorial, but youve changed the order in which the buttons are in.

When you say script.Parent it means the thing thats above it. So if your script is in a textbutton saying script.parent would be accessing that textbutton. So you need to probably change a few of these, but yeah this is just terrible anyways id just delete all those scripts and put 1 inside the main gui then loop through everything specifying buttons, turning the rest off or on depending on which one you click.

2 Likes

I still dont understand. but I guess ill try something because I dont want to break rules here

1 Like

You don’t need 8 scripts to control 8 buttons, and it’s also a pretty bad idea to have code like script.parent.Parent.Parent..... because it depends so much on the structure of things in the explorer, making changes very difficult, and it’s also really difficult to figure out :stuck_out_tongue:

My advice is to put a single LocalScript inside the ScreenGui and control everything from there. If you use loops and functions you don’t have to type out code for each button you want to add. Ask away if you need help doing that.

I also tried to do this

Note 3
local mouse = script.Parent
local Notes3 = script.Parent.Parent.Parent.Parent.Notes3
local Notes4 = script.Parent.Parent.Parent.Parent.Notes4
local Notes5 = script.Parent.Parent.Parent.Parent.Notes5
local Notes6 = script.Parent.Parent.Parent.Parent.Notes6
local Notes7 = script.Parent.Parent.Parent.Parent.Notes7
local Notes8 = script.Parent.Parent.Parent.Parent.Notes8
local Notes9 = script.Parent.Parent.Parent.Parent.Notes9
local Notes10 = script.Parent.Parent.Parent.Parent.Notes10

mouse.MouseButton1Click:Connect(function()
Notes3.Visible = true
Notes4.Visible = true
Notes5.Visible = true
Notes6.Visible = true
Notes7.Visible = true
Notes8.Visible = true
Notes9.Visible = true
Notes10.Visible = true
end)

And it does not work. Can someone help me please

I even tired this

Note 3
local mouse = script.Parent
local Notes3 = script.Parent.Parent.Parent.Parent.Notes3
local Notes4 = script.Parent.Parent.Parent.Parent.Notes4

mouse.MouseButton1Click:Connect(function()
Notes3.Visible = true
Notes4.Visible = false
end)

And it does not work. Can someone help me please

I even tired this

Note 3
local mouse = script.Parent
local Notes3 = script.Parent.Parent.Parent.Parent.Notes3
local Notes4 = script.Parent.Parent.Parent.Parent.Notes4

mouse.MouseButton1Click:Connect(function()
Notes3.Visible = false
Notes4.Visible = true
end)

And it does not work. Can someone help me please

I even tired this

Note 3
local mouse = script.Parent
local Notes3 = script.Parent.Parent.Parent.Parent.Notes3
local Notes4 = script.Parent.Parent.Parent.Parent.