Is this a bad practice?


  • Is it a bad practice to contain/parent all of you scripts into one local script, like so:
    0_1529993700842_Bad Practice Forums.PNG

    I prefer the organization method myself as it allows me to initiate/start scripts using require() after certain things load (assets, objects, etc.). I just wanted to know if this is somehow inefficient or unpopular amongst the developer community.


  • @LateralLace kind of is. You should instead put a folder inside of your local script, and put the modules that correspond to the folder’s name in the folder.


  • But alone, is it generally ok to write code into module scripts that are parented under one local script?


  • @LateralLace yes. but i mentioned the folder thing so it doesn’t get messy.


  • I don't care. I don't see it a bad practice, like it is good to contain things related to a master script inside the script. At least you do it better than me, i have a ton of scripts right inside the Workspace, and almost all of them are there to do a same or similar function :P

    (Don't worry, I've since started to place my scripts in ServerScriptService, placing important scripts in the Workspace is a REALLY BAD practice)


  • It isn't a bad practice since they are module scripts. It doesn't matter. Its up to you on how you want to stay organized.


  • @LateralLace I would do this commonly for modules that are only used once. For shared modules I put them in folders.

Log in to reply
 

Looks like your connection to Scripting Helpers was lost, please wait while we try to reconnect.