Hello. I have gotten a lot more experienced at scripting now but I have doubts about this script. Here it is,
1 | for i, v in pairs (script.Parent.Parent:GetChildren()) do -- find all screengui's |
2 | for k, r in pairs (v:GetChildren()) do -- find all frames |
3 | if r:IsA( "Frame" ) then -- if a frame then |
4 | r:IsA( "Frame" ).Visible = false -- turn it invisible |
5 | end |
6 | end |
7 | end |
Your code will only find Frames directly inside of ScreenGuis, not any Frames within those Frames.
Now, assuming that's intentional, your problem is line 4 in the above. The IsA
method returns true
or false
. Booleans do not have a Visible
property, you want to modify the property on the Frame itself. Simply change line 4 to this:
1 | r.Visible = false |