Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

What's the better structure: Scripts in individual parts, or script in server script storage?

I'm trying to make multiple "turret-like" objects that periodically create a part, however, I'm not sure the best way to structure this. Right now, I have a single script that manage all the turrets, all on the same thread. I kinda want more freedom on how each individual groups of turret work, so would it be better to give each turret its own script, or create multiple threads within the server script?

2 answers

✓ Accepted answer

I find it easier to manage code when it is all centralized into ServerScriptService. If you want to have customizable turrets, you could put a module script in each turret that contained settings and have your centralized code read off each module as it executes.

I'd use a script inside a part when I'm doing something to it, and I'd use a script inside ServerScriptStorage if it's things that aren't related to parts. (leaderstats, gameScript, etc.)

This discussion is preserved as it was. New answers, comments, and votes are closed.