Not exactly a question about specific code, but I'm curious about just how many scripts I need for things like text buttons and other GUI assets. Should I have a local script under every text button to make it run easier, or should I make a GUI master script? Is there a benefit to one or the other? Does it even matter?
COMMUNITY QUESTION
Do I need a ton of different scripts to run my GUIs (textbuttons etc)?
1 answer
In my personal preference I would use only one script as it’s easier
1 comment
0
agreed
This discussion is preserved as it was. New answers, comments, and votes are closed.

8 comments
Most of the time only 1, sometimes it can be 2, and sometimes it can be 3. It's really really unlikely for someone to use 4 scripts for that scenario.
typically i think its better practice to confine gui related stuff to a single script. ie id want a character creation menu to be handled by one local script (the gui stuff anyways)
I realize that it's probably better practice, but are there any kind of performance issues with tons of local scripts or am I just exaggerating?
More scripts will increase the physical size of the game, but I don't think it will cause any performance hit unless you are running a ton of loops and stuff inside each script.
Scripts aren't physical. What are you on about.
The performance difference, if any, is negligible. But you can use one whole script for maintainability.
So the only issue with multiple local scripts is efficiency of the code?
@incapaxian I never said scripts were physical? I said that it will increase the physical size of the game, as in there will be more physical storage space required to hold the game.