Cleaning up module script that's 450+ lines long?

hey devs! this’ll be a pretty quick question but for some reason i can’t really find anything about like making a hiarchy of module scripts for a detailed system. i already have a very long script but i don’t want everything to go to crap just because i don’t have the “self” variable in every script (im using oop). hopefully this makes sense. thanks!

2 Likes

I’m not sure I am understanding the question correctly, however;
Use multiple ModuleScripts inside a ModuleScript.

1 Like

yeah thats what i want to do but how do i do this effectily? because then i don’t have all of the variables and crap y’know

1 Like

you should divide all the functions from your biggest modulescript and put them all in different modulescripts. also 450+ lines is a rookie number. it’s not that bad unless you reach like 11k lines and then the modulescript can’t be required anymore

1 Like

I don’t think 400 lines of code is too bad, but you could probably benefit from categorizing functions and variables into smaller, more specific modules.

1 Like

ok thanks guys i just want to sort it out and stuff before it becomes larger

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.