Jonibus
|
  |
| Joined: 30 Jan 2010 |
| Total Posts: 8985 |
|
|
| 10 May 2014 08:02 PM |
coroutine.wrap(function() while true do if not hunting and target == "Nobody" then script.Parent.Parent.Humanoid:MoveTo(Vector3.new(math.random(-132,116),3.1,math.random(-125,126)),game.Workspace.Floor) wait(math.random(20,60)) end end end)()
It also says there is some problem with resuming the thread. What does this mean and how can I fix it?
Follow me on twitter: @Jonibus_RBX |
|
|
| Report Abuse |
|
|
Jonibus
|
  |
| Joined: 30 Jan 2010 |
| Total Posts: 8985 |
|
|
| 10 May 2014 08:06 PM |
The second error is "Timeout while resuming thread" The game freezes up while it happens.
Follow me on twitter: @Jonibus_RBX |
|
|
| Report Abuse |
|
|
Jonibus
|
  |
| Joined: 30 Jan 2010 |
| Total Posts: 8985 |
|
|
| 10 May 2014 08:26 PM |
Bump.
Follow me on twitter: @Jonibus_RBX |
|
|
| Report Abuse |
|
|
vlekje513
|
  |
| Joined: 28 Dec 2010 |
| Total Posts: 9057 |
|
|
| 10 May 2014 08:27 PM |
| Lets say the of stat,ent is false, it endlessly loops. |
|
|
| Report Abuse |
|
|
magnalite
|
  |
| Joined: 18 Oct 2009 |
| Total Posts: 2467 |
|
|
| 10 May 2014 08:27 PM |
You have a non yielding infinite loop.
One which keeps going without a wait() in it.
That while true do one ya have there.
|
|
|
| Report Abuse |
|
|
|
| 10 May 2014 08:27 PM |
| simplify it, its while true do end |
|
|
| Report Abuse |
|
|
Jonibus
|
  |
| Joined: 30 Jan 2010 |
| Total Posts: 8985 |
|
|
| 10 May 2014 08:28 PM |
Which statement? I want it to loop endlessly (with the random wait of 20-60 seconds) as long as the two conditions are met.
Follow me on twitter: @Jonibus_RBX |
|
|
| Report Abuse |
|
|
|
| 10 May 2014 08:29 PM |
while true do wait(math.random(20,60))
instead of
while true do |
|
|
| Report Abuse |
|
|
Jonibus
|
  |
| Joined: 30 Jan 2010 |
| Total Posts: 8985 |
|
|
| 10 May 2014 08:35 PM |
Alright, I'll try that, thanks.
Follow me on twitter: @Jonibus_RBX |
|
|
| Report Abuse |
|
|
|
| 17 May 2014 11:06 PM |
| First of all, humanoid isn't the character model. It just holds the player's data. You just say: script.Parent.Parent |
|
|
| Report Abuse |
|
|
Jonibus
|
  |
| Joined: 30 Jan 2010 |
| Total Posts: 8985 |
|
|
| 18 May 2014 10:52 AM |
I long since fixed this script, and you're incorrect. There are two different forms of MoveTo. One is to teleport models, one is to make humanoids walk.
Follow me on twitter: @Jonibus_RBX |
|
|
| Report Abuse |
|
|
|
| 18 May 2014 10:57 AM |
| Making a player's character walk to a point will need to have the player to not have Mouse Lock on. |
|
|
| Report Abuse |
|
|
Jonibus
|
  |
| Joined: 30 Jan 2010 |
| Total Posts: 8985 |
|
|
| 18 May 2014 08:37 PM |
It's not a character it's an AI.
Follow me on twitter: @Jonibus_RBX |
|
|
| Report Abuse |
|
|