As seen here, any function that uses a generator needs to mark this https://github.com/PenguinMod/PenguinMod-Vm/blob/develop/src/compiler/intermediate.js#L65 as true. You can get this IRScript from the script tree gen instance https://github.com/PenguinMod/PenguinMod-Vm/blob/develop/src/compiler/irgen.js#L80 <img width="423" height="239" alt="Image" src="https://github.com/user-attachments/assets/d4bb9f39-45f8-46ce-a80a-4b41026d260a" />