|
| 04 Oct 2014 12:10 AM |
everything is defined
coroutine.resume(coroutine.create(function() while wait(1/10) do if llamas[i].ClassName == "Hat" then llamas[i].Parent = nil end end end)) |
|
|
| Report Abuse |
|
Casualist
|
  |
| Joined: 26 Jun 2014 |
| Total Posts: 4443 |
|
|
| 04 Oct 2014 12:23 AM |
wait() is a roblox function that internally calls yield; since you aren't externally calling resume at the rate that your code is calling wait() your code wont do what you want(and since your rate is 0-you dont call resume in a loop- your code doesn't do anything).
Since you are creating a coroutine that you don't seem to mess with after instantiation, I would suggesting using anonymous coroutines here.
i.e.
delay(0, function() while wait(1/10) do if llamas[i].ClassName == "Hat" then llamas[i].Parent = nil end end end)
Spawn(function() while wait(1/10) do if llamas[i].ClassName == "Hat" then llamas[i].Parent = nil end end end) |
|
|
| Report Abuse |
|