lnformaI
|
  |
| Joined: 02 Jul 2009 |
| Total Posts: 1684 |
|
|
| 27 Mar 2016 03:34 PM |
When I run
if #players == 1 then print("Hello") end
after joining the game, why does nothing happen?
Thanks in advance.
hi everypony /)^3^(\ |
|
|
| Report Abuse |
|
|
|
| 27 Mar 2016 03:35 PM |
players = game.Players:GetChildren() if #players == 1 then print("Hello") end
|
|
|
| Report Abuse |
|
|
lnformaI
|
  |
| Joined: 02 Jul 2009 |
| Total Posts: 1684 |
|
|
| 27 Mar 2016 03:38 PM |
Unfortunately, it still seems to do nothing. The troubling part is:
players = game.Players:GetChildren() print("Running") while true do print("Running2") wait(2) if #players == 1 then print("Running3") end
No error is returned. Running prints, Running2 prints, but not Running3 when I join the server.
hi everypony /)^3^(\ |
|
|
| Report Abuse |
|
|
Fabunil
|
  |
| Joined: 25 Oct 2013 |
| Total Posts: 4325 |
|
|
| 27 Mar 2016 03:41 PM |
print("Running") while true do print("Running2") players = game.Players:GetChildren() wait(2) if #players == 1 then print("Running3") end |
|
|
| Report Abuse |
|
|
lnformaI
|
  |
| Joined: 02 Jul 2009 |
| Total Posts: 1684 |
|
|
| 27 Mar 2016 03:42 PM |
Perfect. Looks like the function was just out of scope.
hi everypony /)^3^(\ |
|
|
| Report Abuse |
|
|
Casualist
|
  |
| Joined: 26 Jun 2014 |
| Total Posts: 4443 |
|
| |
|