The following is a script in workspace, which fires when a player joins the game. If the name of the player that joins the game is in the list of names in the table, the gui inside the player's playergui will be set to enabled.
Just make sure that you have your gui in startergui, so that it will be copied to player's playergui when they join. Also make sure that the name of said gui is "ScreenGui", and that enabled is set to false for that gui.
01 | game.Players.PlayerAdded:connect( function (player) |
02 | print ( "A player has entered: " .. player.Name) |
03 | local list = { "123marble" , "yoyoy" , "Player" } |
04 | for i, v in pairs (list) do |
05 | if v = = player.Name then |
06 | player.PlayerGui:WaitForChild( "ScreenGui" ) |
07 | player.PlayerGui.ScreenGui.Enabled = true |
if this helped plz accept answer, and if you have any questions feel free to ask.
Closed as Not Constructive by Goulstem
This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.
Why was this question closed?