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

Gui script won't work?

Asked by
Spoookd 32
7 years ago

I am trying to get a gui to become invisible when a player joins and character loads in. But it won't work. I made it into a local script and script and tried putting it in differen't places and it didn't work.

game.Players.PlayerAdded:connect(function(plr)
    plr.CharacterAdded:connect(function(chr)
        game.StarterGui.ScreenGui.Frame.Visible = false
        game.StarterGui.ScreenGui.TextLabel.Visible = false
    end)
end)

1 answer

Log in to vote
0
Answered by
LostPast 253 Moderation Voter
7 years ago
game.Players.PlayerAdded:connect(function(plr)
    plr.CharacterAdded:connect(function(chr)
            plr.PlayerGui.ScreenGui.Frame.Visible = false
        plr.PlayerGui.ScreenGui.TextLabel.Visible = false
    end)
end)

The startergui is the place that puts the gui into the player.

The PlayerGui in the plr is the gui that the player sees.

Ad

Answer this question