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 » Scripting Helpers
Home Search
 

y dis no work

Previous Thread :: Next Thread 
cooldude999921 is not online. cooldude999921
Joined: 13 Aug 2011
Total Posts: 3702
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 is not online. 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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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