|
| 13 Jul 2016 08:30 PM |
function PlayerAdded(p) local sgui = game.StarterGui sgui.ScreenGui.Player1.Text = p.Name sgui.ScreenGui.Player2.Text = "Waiting..." if sgui.ScreenGui.Player1.Text == p.Name then sgui.ScreenGui.Player1.Text = p.Name else sgui.ScreenGui.Player2.Text = p.Name
end end game.Players.PlayerAdded:connect(PlayerAdded)
|
|
|
| Report Abuse |
|
|
| |
|
JuuRanium
|
  |
| Joined: 21 Sep 2011 |
| Total Posts: 113 |
|
|
| 13 Jul 2016 08:37 PM |
1; Test it. 2; Maby is this does not work try p.Parent instead of p.Name
|
|
|
| Report Abuse |
|
|
|
| 13 Jul 2016 08:39 PM |
| i want to see it works with both boxes the first box does |
|
|
| Report Abuse |
|
|
|
| 13 Jul 2016 08:41 PM |
No changing guis in the startergui will not affect the player right away. I'm not entirely sure what Player1 or Player2 is. Is it a Frame? TextLabel? or are you trying to reference the player as they join. Also you might want to add some wait(x) so it doesn't change the text rapidly.
Try using: local players = game.Players:GetChildren() for _,v in pairs(players) do v.PlayerGui --and so on to your gui and frame/textlabel/button end
|
|
|
| Report Abuse |
|
|
|
| 13 Jul 2016 08:43 PM |
1. text labels
2. it doesn't need to affect the player. it just needs to show the names in two text boxes as of now.
3. the first box does work but i have no one to test with so i can't see if second box does work |
|
|
| Report Abuse |
|
|
|
| 18 Apr 2017 04:24 AM |
no it wont :(
-caitphish'ss's's oficila alternate acc ||| 10k posts |
|
|
| Report Abuse |
|
|