Luminak
|
  |
| Joined: 27 May 2012 |
| Total Posts: 2809 |
|
|
| 06 Jul 2015 08:59 AM |
plr = game.Players:GetChildren() wait(5) plr.PlayerGui.main.plrs.Text = "hi" |
|
|
| Report Abuse |
|
|
Luminak
|
  |
| Joined: 27 May 2012 |
| Total Posts: 2809 |
|
| |
|
lululukas
|
  |
| Joined: 23 Aug 2010 |
| Total Posts: 1043 |
|
|
| 06 Jul 2015 09:05 AM |
for i,v in pairs(game.Players:GetChildren()) do wait(5) v.PlayerGui.main.plrs.Text="hi"
Try that. |
|
|
| Report Abuse |
|
|
Luminak
|
  |
| Joined: 27 May 2012 |
| Total Posts: 2809 |
|
|
| 06 Jul 2015 09:07 AM |
| nope and you forgot the end |
|
|
| Report Abuse |
|
|
lululukas
|
  |
| Joined: 23 Aug 2010 |
| Total Posts: 1043 |
|
| |
|
|
| 06 Jul 2015 09:10 AM |
plr = game.Players:GetChildren() This returns a table, not a reference to an object.
-- LocalScript or (Server)Script for _, Player in pairs(game.Players:GetPlayers()) do print(Player.Name) end
But, your script would error, LocalScript or (Server)Script; it must be a LocalScript and can only be done PER player. This is because client's can't access other player's PlayerGui, and the server can't at all.
-- LocalScript local Player = game.Players.LocalPlayer -- The client's Player object wait(5) Player.PlayerGui.main.plrs.Text = "hi" |
|
|
| Report Abuse |
|
|
|
| 06 Jul 2015 09:12 AM |
Relevant readings:
http://wiki.roblox.com/index.php?title=Table http://wiki.roblox.com/index.php?title=Pairs#pairs http://wiki.roblox.com/index.php?title=API:Class/Script http://wiki.roblox.com/index.php?title=API:Class/LocalScript http://wiki.roblox.com/index.php?title=LocalPlayer |
|
|
| Report Abuse |
|
|