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

Why doesn't the ScreenGui become invisible?

Heres what I have

game.Players.PlayerAdded:Connect(function()
game.Players.LocalPlayer.PlayerGui.ScreenGui.Frame.Visible = false
end)

Why isnt this make the gui invisible?

2 answers

It's because you cannot grab the PlayerGui from a Server Script. Use a local script instead.

If you ARE using a local script, do this:


local player = game.Players.LocalPlayer
repeat wait() until player.PlayerGui.ScreenGui.Frame --wait for it to load
player.PlayerGui.ScreenGui.Frame.Visible = false

this will make the Frame invisible every time the player enters the game or resets.

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