PC Info: Windows 11, 23H2, Build 25951.1010 Date first experienced: 10/7/23 Date last experienced: 10/7/23 Constistency: Constant Impact: Extreme, literally cannot develop my game
Reproduction Steps:
Create a ModuleScript
Try adding any function with a print statement inside of it
Run a console command requiring the ModuleScript and attempting to use the function
Expected Behavior: When using the function in the command bar it will print Actual Behavior: When trying to require the ModuleScript it says “Requested module experienced an error while loading”, studio also crashes randomly.
Temporary solution: Restarting studio, works 1/3 of the time
This has happened with every module script in every game I have made. Even when I try running print() inside of the ModuleScript.
I tried using the function through the console and it says if failed to load it, which shouldn’t be an issue as the module is in the correct location.
When another dev tries to use the ModuleScript the function runs properly. This is a major issue because I can’t test any ModuleScript period. My entire game runs on ModuleScripts and I literally cannot work on it because none of them run for me.
if its having an error while loading, check the script for any errors. Try requiring a module script with nothing but a print statement in it and see if that works!
This only works sometimes, I have to get studio to restart like 3 times before it fixes this issue. I restarted it once a minute ago and it still didn’t work but just restarted it again and its working now. This is super annoying especially if your game has a lot of assets.
assuming it’s only in studio, I would assume its something wrong with the luau language in this case.
Reinstall studio incase it’s the language itself and not just a one-time error. Restart your PC, if none of this works migrate all your scripts and stuff over to a new game and see if that helps.