Limit to storing data in modulescripts (tables)

how much memory does this add if i have a modulescript for everygun, and a modulescript for every magazine/attachment

average lines in gun config: ~90
average lines in mag config: ~9;
average lines in attachment config: = 12;

should i reconsider how i store information? will this add up very quickly? bad practice?
use 1 giant config (unreadable though)? or is this fine?

1 Like

Modulescripts are only loaded once, any table created in a modulescript is only created once as a result:
Programming in Lua : 8.1.

1 Like

i meant this post from a game-design standpoint not a technical one. would this add up quickly and be a cause for increased memory usage/ are there any better alternatives

1 Like

No, having the same number of modulescripts required in 1 gun each vs 10 guns each would use the same memory.

1 Like

module scripts are used to store informations so techinally they will always use the same ammount of memory until you make something really big in only 1 script and even that way i really doubt it will change that allot in memory

1 Like

what makes a game memory be high is the workspace stuff and models of tools/npcs/maps that you put in replicatedstorage

1 Like