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?
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?
the gui might take some time to spawn?
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.