BRAYONCE
|
  |
| Joined: 18 Apr 2011 |
| Total Posts: 1551 |
|
|
| 13 Dec 2015 01:39 PM |
hi im new to using coroutine
I wrote this:
#code local changeGlass = coroutine.create(function(glass) for i = 1,10 do glass.Transparency = glass.Transparency - 0.1 wait() end end)
for i,v in pairs(script.Parent.Special.Glass:GetChildren()) do coroutine.resume(changeGlass, v) end
but I get this error:
"19:37:31.313 - attempt to call a nil value 19:37:31.313 - cannot resume non-suspended coroutine"
if anyone knows how to fix- it would be much appreciated.
#code Forums.BRAYONCE.Response:FireClient(response) |
|
|
| Report Abuse |
|
BRAYONCE
|
  |
| Joined: 18 Apr 2011 |
| Total Posts: 1551 |
|
|
| 13 Dec 2015 01:58 PM |
Bump; the wiki page is basically a replica of this code before anyone links me.
#code Forums.BRAYONCE.Response:FireClient(response) |
|
|
| Report Abuse |
|
Auzer
|
  |
| Joined: 24 Dec 2011 |
| Total Posts: 1590 |
|
|
| 13 Dec 2015 02:32 PM |
| Resume the coroutine with :coroutine.resume() |
|
|
| Report Abuse |
|