local par = script.Parent.Parent.Parent.Parent local Table = { par.Developers.TextButton, par.News.TextButton, par.Exit.TextButton, par.Play.TextButton, par.UpdateLog.TextButton, } script.Parent.MouseButton1Click:connect(function() par.updateloginfo.TextLabel.Visible = false end) for i=1,#Table, 1 do Table[i].Visible=true end
When I press "Update Log" it hides Play, Update Log, Exit, News and Developers. Thats what I want but when I put a back back button on updateloginfo it hides the TextLabel which is what i want but it doesnt show the Main Menu. Help?
There seems to be missing code here, since that appears to only be your 'back' button.
The reason this code doesn't work is because you loop through the Table outside of the function connection to the mouse click. What this means is that that loop only ever runs once: when the script is first run by the Server.
To fix that, simple put the loop inside of the function:
local par = script.Parent.Parent.Parent.Parent local Table = { par.Developers.TextButton, par.News.TextButton, par.Exit.TextButton, par.Play.TextButton, par.UpdateLog.TextButton, } script.Parent.MouseButton1Click:connect(function() par.updateloginfo.TextLabel.Visible = false for i=1,#Table, 1 do Table[i].Visible=true end end)