I’m currently making a system that I want to be largely automated, but I’m wondering which of the two options im thinking of would be better for the sake of performance. Do I:
Have a master script that uses workspace:GetDescendants and workspace.DescendantAdded too check for any ThingDoer folders and set them up to do whatever
Or do I put a script that requires a modulescript in everything I want to do the thing.
I’m just not entirely sure how much memory a large number of scripts would use versus a large number of value instances, and if listening for DescendantAdded would make performance take a major hit.
Since you didn’t explain the specific system you’re trying to make, i’ll have to talk general here:
It’s generally better to use module scripts over value instances. A ModuleScript that returns a table of values uses less memory than a folder of values. Also using one master script that uses workspace:GetDescendants() will have to loop through a large number of instances, which is slower than just using module scripts.
Although not officially stated, Value instances (NumberValue, BoolValue etc), BindableEvents and BindableFunctions, are quite outdated and ModuleScripts should be used instead.