Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Finding all Frames in a ScreenGui then making them all invisible?

Asked by 10 years ago

Hello. I am trying to make it so that when a player joins the game that player's Screen Gui's all appear invisible when he joins. NOTE: Tutorial is a screenGui, and BasicMath and Variables is a screen gui NOTE: This is a local script

frame = game.StarterGui:IsDescendantOf(game.StarterGui.Tutorials.BasicMath and game.StartGui.Tutorials.Variables)

game.Players.PlayerAdded:connect(function()
    frame.Frame.Visible = false
end)

I tried using "IsDescendantOf" because I just thought that meant that it is a child of that thing. So basically I thought it would find all the Frame's in BasicMath and Variables and make them invisible.

1 answer

Log in to vote
0
Answered by
Moxeh 84
10 years ago

Easiest thing to do is to have a ScreenGui with the child "MainFrame" Place everything underneath that. After doing so have a script like this:

game.Players.PlayerAdded:connect(function()
game.StarterGui.YOURGUI.MainFrame.Visible = false
Ad

Answer this question