So to expand on my issue I made a script that makes all text buttons visible property to false except for the one that is being clicked. The one that is clicked changes and all but if I click another one I noticed that a portion of the code did not make the other labels visible property to false
01 | local clickEffect = script.Parent:FindFirstChild(script.Parent.Name .. 2 ) |
02 | local Underline = clickEffect:FindFirstChild( "UnderLine" ) |
03 | local Lables = game.StarterGui.MainMenu.NavBar.Lables:GetChildren() |
04 | script.Parent.MouseButton 1 Click:Connect( function () |
05 | --[[for x = 1,#Lables,1 do |
06 | Lables[x]:FindFirstChild(Lables[x].Name .. 2).Visible = false |
07 | end |
08 | --]] |
09 | clickEffect.Visible = true |
10 | end ) |
Thanks
So if I understand correctly, you want to make all the guis invisible except for the one you clicked on?
Well here it is
01 | local clickEffect = script.Parent [ script.Parent.Name.. 2 ] --waduoflip? |
02 | local Underline = clickEffect.UnderLine |
03 | local Lables = game.Players.LocalPlayer.PlayerGui.MainMenu.NavBar.Lables:GetChildren() |
04 | script.Parent.MouseButton 1 Click:Connect( function () |
05 | for x = 1 , #Lables do |
06 | if Lables [ x ] ~ = script.Parent then |
07 | Lables [ x ] [ Lables [ x ] .Name.. 2 ] .Visible = false --Weird things going on in your code |
08 | end |
09 | end |
10 | clickEffect.Visible = true |
11 | end ) |