Requiring modules not working

Ok so uhh I was peacefully scripting and testing some stuff and out of nowhere my script suddenly stopped working it specifically stopped at requiring modules but when I commented the modules getting required It worked but I dont know why this happens. And also I was using this plugin to export animation from blender and this plugin does stuff like running my serverscripts but I kinda didnt worry about it.But at the time this problem happened I wasn’t even using the plugin :<


image

1 Like

I’ve noticed that it doesn’t print the 4th time. ‘classManager’ might be the issue. Maybe you are calling ‘WaitForChild’ on something which is nil.

1 Like

Nope its totally there I even printed the exact thing without requiring and its there.
image

1 Like

I mean that you might be calling ‘WaitForChild’ in that module which is nil.

Im calling one but it exist


image

Ok then, check the ‘WarriorClassModule’ and see if you are calling ‘WaitForChild’ in it.

or… you might be requiring eachother.

p.s: I’m not sure but it seems to be this case.

It’s possible that you’re cylically requiring ClassesModule and/or ClassManagerModule and it’s timing out your script.

Do either of those 2 modules require eachother?

you are right image
Im a dummy

But how would i fix this? I cant think of anything

I had a similar issue a while back and had to post a thread about it. You can read some of the replies here, they might be helpful for you:

Best approach for modules to interact with eachother? - Help and Feedback / Scripting Support - DevForum | Roblox

Well I have an idea it was to just make another module which can interact with the class manager, and the warrior class module will interact with that module that way it wont cylically requiring eachother.

I don’t really know the specifics of your use case so I can’t really give you an answer in regards to what you should do. Read over the thread, you’ll find useful information there.

I think I got it thanks :> have a good day

Ok I solved this by just actually getting self as im using an oop system but I actually still dont know how would you get two modules interact each other but my design was decent so I actually dont have to do that anymore.