|
| 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
|
  |
| 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 |
|
|
|
| 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 |
|
|
|
| 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 |
|
|