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: ModuleScripts yielding

Previous Thread :: Next Thread 
Deafgift100 is not online. Deafgift100
Joined: 09 May 2010
Total Posts: 3958
08 Apr 2016 11:40 AM
http://wiki.roblox.com/index.php?title=API:Class/ModuleScript

What does it mean by "any script currently require()ing it will also yield" in the Notes section?
Report Abuse
error9999 is not online. error9999
Joined: 05 Sep 2009
Total Posts: 1593
08 Apr 2016 11:52 AM
if you use a wait(1) both the modulescript and the other script will sleep for one second.
Report Abuse
Deafgift100 is not online. Deafgift100
Joined: 09 May 2010
Total Posts: 3958
08 Apr 2016 11:58 AM
So this would be bad for making enemy NPCs which attack? Would they all like stop if I put a wait somewhere?
Report Abuse
0xBAADF00D is not online. 0xBAADF00D
Forum Moderator
Joined: 18 Nov 2015
Total Posts: 483
08 Apr 2016 12:22 PM
It's probably easier if you think about it a different way. Imagine the ModuleScript's code wrapped in a function() ... end. When you require() it, it's basically calling that function (and logging the result so it only happens once.)
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