So I'm working on custom made health system with each limb or part having few values like resistance, bleeding factor etc.
I've looked into the ways to store these values securely and efficiently and I stumbled upon ModuleScripts. After a bit of research and learning I now have deeper understanding of ModuleScripts as means of storing data but I'm wondering on conceptual level how will it all function.
As I'm guessing I will have to create a table in ModuleScript that will be required by a Script. Upon new players entering I will have to add their data to this table and when they leave I will have to remove it. Whenever they get damaged or healed I will have to fetch this data from the ModuleScript in order to change it (using function inside ModuleScript of course).
I already have my code planned out but I have few questions regarding efficiency of this method as well as how it will function with let's say 50 players at once.
If this method is inefficient or the concept I described has better alternatives, I will gladly take any advises and corrections.