It only changes one, and when I put a print, it works, but it doesn't change the text.
1 | local label = game.StarterGui.waitGui.waitFrame.waitLabel |
2 |
3 | game.Players.PlayerAdded:connect( function (plr) |
4 | label.Text = "Welcome, " ..plr.Name.. ", to WIP, an unfinshed game." |
5 | wait( 2 ) |
6 | --if I put print here, the print works, but still doesn't change the text. |
7 | label.Text = "0" |
8 | end ) |
You are modifying the StarterGui which isn't gonna change the player view, but the servers view. You need to do this:
1) move the variable to where it can be changed to the players PlayerGui.
2) Modify, after the player is loaded
Basically this:
1 | game.Players.PlayerAdded:connect( function (plr) |
2 | repeat wait() until plr:WaitForChild( "PlayerGui" ) -- This waits for the GUI's for the player to load |
3 | local label = plr.PlayerGui.StarterGui.waitGui.waitFrame.waitLabel -- This goes into the PlayerGui and modifies his view |
4 | label.Text = "Welcome, " ..plr.Name.. ", to WIP, an unfinshed game." |
5 | wait( 2 ) |
6 | label.Text = "0" |
7 | end ) |