I've tried to
game.Workspace.GAP.ScreenGui1,ScreenGui2,ScreenGui3,ScreenGui4.Visible = false
I've tried to
game.Workspace.GAP.ScreenGui1,ScreenGui2,ScreenGui3,ScreenGui4.Visible = false
luciandean2004 is correct but a faster way to do this would be this:
for i,v in ipairs(game.Workspace:WaitForChild("GAP"):GetChildren()) do
if v:IsA("ScreenGui") then
v:WaitForChild("Frame").Visible = false
end
end
If you don't know what any of this does, go to ROBLOX Wiki and learn more.
http://wiki.roblox.com/index.php?title=Function_dump/Basic_functions#ipairs
ScreenGuis do not have a 'visible' value, and you cannot use that way to retrieve objects. You will first have to put a 'frame' inside each screengui, make those frames transparent, then move everything from each screengui into the frames. Then, once you have done that, use the following code:
game.Workspace.GAP.ScreenGui1.Frame.Visible = false
game.Workspace.GAP.ScreenGui2.Frame.Visible = false
game.Workspace.GAP.ScreenGui3.Frame.Visible = false
game.Workspace.GAP.ScreenGui4.Frame.Visible = false
If this is too complicated, please tell me and I will try and explain it better.
This discussion is preserved as it was. New answers, comments, and votes are closed.
3 comments
You have to do the code over again, unless you use lots of loops.
You could put them in a folder and use, game.Workspace.GAP.ScreenGUIFolder:GetChildren().Visible = false. But for the record this probably won't work. That's why I'm not going to answer this for fear of being wrong
Also, I you can't make a screen GUI visible to false because screen GUIs don't have a is visible setting. Hope I helped a little.