generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Coroutine not working

Previous Thread :: Next Thread 
BRAYONCE is not online. 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 is not online. 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 is not online. Auzer
Joined: 24 Dec 2011
Total Posts: 1590
13 Dec 2015 02:32 PM
Resume the coroutine with :coroutine.resume()
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image