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

Do I need a ton of different scripts to run my GUIs (textbuttons etc)?

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?

8 comments

0

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.

0

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)

0

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?

0

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.

0

Scripts aren't physical. What are you on about.

0

The performance difference, if any, is negligible. But you can use one whole script for maintainability.

0

So the only issue with multiple local scripts is efficiency of the code?

0

@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.

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.