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: Help with COroutine please

Previous Thread :: Next Thread 
Zechariax is not online. Zechariax
Joined: 22 Mar 2012
Total Posts: 206
27 Feb 2016 06:25 PM
So i want to make it loop for 4 seconds, then stop, by using coroutines. Why does this not work:

local printer = coroutine.create(function(text)
while wait(0.1) do
print(text)
end

end)

coroutine.resume(printer, "hi")

wait(4)
coroutine.yield(printer)
Report Abuse
Zechariax is not online. Zechariax
Joined: 22 Mar 2012
Total Posts: 206
27 Feb 2016 06:29 PM
bump1
Report Abuse
Zechariax is not online. Zechariax
Joined: 22 Mar 2012
Total Posts: 206
27 Feb 2016 06:33 PM
bump2
Report Abuse
Zechariax is not online. Zechariax
Joined: 22 Mar 2012
Total Posts: 206
27 Feb 2016 06:38 PM
NO HELP? It's a coroutine for god's sake. BUMP3
Report Abuse
Zechariax is not online. Zechariax
Joined: 22 Mar 2012
Total Posts: 206
27 Feb 2016 06:43 PM
pLEASE! Someone help me
Report Abuse
kingkiller1000 is not online. kingkiller1000
Joined: 12 Dec 2008
Total Posts: 26415
27 Feb 2016 06:51 PM
I responded to your previous thread with the answer, you know.
Report Abuse
Zechariax is not online. Zechariax
Joined: 22 Mar 2012
Total Posts: 206
27 Feb 2016 06:51 PM
bump7
Report Abuse
Zechariax is not online. Zechariax
Joined: 22 Mar 2012
Total Posts: 206
27 Feb 2016 06:55 PM
@KINGKILLER100 but you didn't solve my problem
Report Abuse
kingkiller1000 is not online. kingkiller1000
Joined: 12 Dec 2008
Total Posts: 26415
27 Feb 2016 07:00 PM
That's because you're not paying attention. If you had looked at my code, you would see that coroutine.yield is supposed to be INSIDE the coroutine function, not at the point you want the function to stop.
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