I just had a very general question! I’m fairly new to scripting as a whole, though I have minimal experience in other languages. Where do some of you guys keep your scripts? Do you keep them in serverscriptstorage and have Modules work all of your scripts? Do some of you have all of your local scripts in StarterCharacter? Or do some of you like to just allocate them to where they are supposed to be?
I have many friends who do a combo of all of these, but I was curious as to what some of the community does so I can better organize future games I make.
I store my scripts based on their function and security , For Something related to the server and needs high security I store them in ServerScriptService. If I want to do stuffs like Manage Keybind with UIS or CAS , I put them in StarterPlayer and to manager Character for a client I put it in StarterCharacterScripts. I store modules in ReplicatedStorage or ServerStorage based on who needs access to it(Server or Client). This how I store my scripts and I also store them in folders , for ease of identification.
Always depends on your use case preferences. Scripts are appropriate to fit pretty much anywhere, but you want to ask yourself if you’re making the right choice in where you’re placing them.
I will always strive to put scripts in four locations: ReplicatedFirst contains my loading logic, ReplicatedStorage contains shared items, ServerScriptService contains server only code and StarterPlayerScripts has client controls. I try and avoid scripts in ServerStorage (they don’t belong there), Workspace (should only be geometry, exceptions given on rare occasion) and anywhere else where they aren’t together with the rest of it game code. This does result in funky organisation on occasion though.
For my team game im the only scripter and the only other person i have is my friend who is my tester and i have a lifting simulator game so i have most scripts in SSS but some in my tools that makes the tools work.
I usually put my
Server Scripts In ServerScriptService.
Local Scripts Into StarterGui or ReplicatedFirst
If you have a script that should be inside of the player usually put that into
StarterPlayer > StarterCharacterScripts
I know this was 2 years ago, but I have to explain.
Server Scripts: ServerScriptService: I would put scripts here for main functionality of the map. If you were doing a natural disasters type map and the code of the disasters are in the script, I would put it in this tag.
Parts: Independent less important scripts
Local Scripts:
StarterGui: Scripts that deal mainly with UI or local sound
StarterCharacterScripts: I would put local scripts in here for functions that require buttons or ContextActionService.