Putting aside what looks better, and just out of pure curiosity, what would be better? Having all your code in one script manage all tasks, or having multiple scripts to manage separate tasks?
Deficiency
The only deficiency I can see for using multiple scripts to handle separate tasks, would be the need to repeat the need to reference the same
information over and over again (i.e, declaring game services
at the beginning of the script, multiple times for different
scripts).
Also, what's your opinion on this? Do you think using multiple scripts to manage different tasks would be more organized? Or is it not worth the repetition of getting the same information instead of it all being in one script? Any insight would be appreciated, thanks.
I think this is really up to user preference. The other answer is pro multiple scripts, but personally I prefer single script with bunch of modules containing logically sorted functions(for example module that has animation handling functions, or other module which handles projectiles).
I just really enjoy having a single main thread, that dictates the gameflow, so it's easier to track down faulty parts of code and generally makes everything easier to find.
Usually I go with one local script and one server script, and each has bunch of modules.
But remember, both methods will be slow when used incorrectly.
Multiple scripts,
with ModuleScripts.
I just needed some way to keep my title style consistent, don't shoot me. What you want to do is use ModuleScripts for any code that is common between a lot of scripts, for example utility functions, and then use a new Script or LocalScript every time you're doing something different.
New subject, new script. You'll thank yourself later.
its better to have tem separated because if cramped there are more erros or bugs than separated