Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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

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

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

This discussion is preserved as it was. New answers, comments, and votes are closed.