jetlogan
|
  |
| Joined: 05 May 2010 |
| Total Posts: 1423 |
|
|
| 13 Oct 2013 01:04 PM |
wait() repeat wait() until game.Players.LocalPlayer repeat wait() until game.Players.LocalPlayer.PlayerGui repeat wait() until game.Players.LocalPlayer.Backpack
local TimePlaying local ItemEquipedRight local ItemEquipedLeft local Zone local Inventory local Speed local Health local Hunger local Thirst local BlinkRate local ClosestObject
function updateTimePlayingValue() TimePlaying = TimePlaying + 1 print(tostring(TimePlaying)) end
coroutine.resume(coroutine.create(updateTimePlayingValue))
Shouldn't it print something? |
|
|
| Report Abuse |
|
|
|
| 13 Oct 2013 01:06 PM |
| Take out the last 2 repeat waits, they are unnecessary and probably why it isn't running the coroutine. |
|
|
| Report Abuse |
|
|
jetlogan
|
  |
| Joined: 05 May 2010 |
| Total Posts: 1423 |
|
| |
|
lordrambo
|
  |
| Joined: 16 Jun 2009 |
| Total Posts: 20628 |
|
|
| 13 Oct 2013 01:10 PM |
coroutine.resume(coroutine.create(updateTimePlayingValue())
^ There's also some other issues but it should run now |
|
|
| Report Abuse |
|
|
jetlogan
|
  |
| Joined: 05 May 2010 |
| Total Posts: 1423 |
|
|
| 13 Oct 2013 01:13 PM |
| okay, now it says its nil on line 20 |
|
|
| Report Abuse |
|
|
lordrambo
|
  |
| Joined: 16 Jun 2009 |
| Total Posts: 20628 |
|
|
| 13 Oct 2013 01:13 PM |
actually:
repeat wait() until game.Players.LocalPlayer:FindFirstChild("PlayerGui")
local TimePlaying local ItemEquipedRight local ItemEquipedLeft local Zone local Inventory local Speed local Health local Hunger local Thirst local BlinkRate local ClosestObject
function updateTimePlayingValue() TimePlaying = TimePlaying + 1 print(tostring(TimePlaying)) end
coroutine.resume(coroutine.create(updateTimePlayingValue())) -- you forgot the () entirely |
|
|
| Report Abuse |
|
|
jetlogan
|
  |
| Joined: 05 May 2010 |
| Total Posts: 1423 |
|
|
| 13 Oct 2013 01:18 PM |
| but what about line 17 now, still doesn't work |
|
|
| Report Abuse |
|
|
jetlogan
|
  |
| Joined: 05 May 2010 |
| Total Posts: 1423 |
|
| |
|
jetlogan
|
  |
| Joined: 05 May 2010 |
| Total Posts: 1423 |
|
| |
|