How do I make a gui open and close with a button and show up on server join?

I am trying to make a menu gui that shows up when the player first joins which closes when they press play, but only comes back if they press a menu button.

1 Like

When you say this I think of a play button, the player joins there’s a menu, the player clicks play and it disappears. In order to do this follow this tutorial:

Thank you. How do I make it so that it will reappear if the player presses a menu button?

1 Like

Add an ImageButton/TextLabel on the side of the screen, and hook it up to a .MouseButton1Click event which enables the screen again.

1 Like

Server script: Connect to PlayerAdded event. From it, FireClient a RemoteEvent
Local script: Connect to the fired RemoteEvent. In that function, make the Gui Visible.

Actually, having said that, during development sometimes this can fail, as the server event is fired before the localscript loads. Not sure if/how that can also happen in production (ie real game).

1 Like

Hi, you’d need a PlayerAdded event.

game.Players.PlayerAdded:Connect(function()
--This would be server script.
end)

Then you’d need a Remote event, so that when a new player joins, all the other players who already had the Gui don’t get it again.

If you want it to look cool with an “Animation”, feel free to learn about tweening, very useful source in LUA.