#Module scripts
1 messages · Page 1 of 1 (latest)
At the end of the day all that matters is that you get the project out. If it becomes an organizational headache it'd probably make more sense to just accept small redundancies and keep stuff isolated
Nothing wrong with spreading code out into modules but there's really no specific reason to do so unless you really have a clear purpose otherwise you might end up spaghetti coding a bunch of shit that could have been isolated
It depends though. Like I'll usually make stuff like gameplay components of a custom CharacterController into a module, or if there is multiple keybind states that can be toggled I'd probably have an InputMode module to make it the hub of that functionality
If I have userinputservice keybinds in client
Should I use modulescript to control them=
Maybe. It depends on how complex your project is gonna be
If you're making a pretty complex inventory game or even if you have different input states for like spectate versus gameplay then yeah probably
If you feel like it would help how you design the code then for sure
Really you should be asking yourself what is the utility of putting this code here
and if it doesn't really have a lot of justification then maybe think about where it would make the most sense or if going through the extra trouble is even worth the effort y'knaw mean
does it have any performance benefits?
It can depending on the situation for sure. Redundant code can be a huge problem
But like I said, you wanna keep yourself focused on actually getting shit done
Hyper optimization will kill your progress fast
hmm alr
but since my whole game is basically done
i have like 3 diff scripts lol
1 for datastore
1 for round system
1 for mechanims
If it's basically done I don't see the point in breaking code up