So I have a ScreenGui and a ton of textbuttons inside it, so to economize time I made a for loop to make all the textbuttons not visible, but it doesn't set the Visible property to false and also the output doesn't give me any errors. My script:
gui = script.Parent gui.Close.MouseButton1Down:Connect(function() for i,v in pairs(gui:GetChildren()) do v.Visible = false end end)
gui = script.Parent gui.Close.MouseButton1Down:Connect(function() for i,v in pairs(gui:GetChildren()) do if v:IsA("TextButton") then v.Visible = false end end end)