So the system i use right now is: [make a single script for to be used in every weapon, copy this script and put it into every weapon thats in the ServerStorage so then i wont have to keep cloning them]
Is this a bad technique? is there any downside to cloning the same script into everything?
And if this strategy is bad then how would i learn and use module scripts to do the same thing. (because last time i worked with them they didnt like me for the locals etc)
So basically im asking if: cloning scripts = bad and if it is bad how do i effectively use module scripts in the same way.
this is what im wondering rn (i havnt had any signs or anything i just want to make the right decision) also how much of an effect would this have if it is the case?
The collection service is mainly useful when you want to group items into specific categories so you can then reference them easier in your scripts without having to depend on a hierarchical structure.
You don’t even need to use modules. You can use a single script to manage every gun. Whenever a player equips the gun or whatever, that script can handle the gun.
well basically what im wondering is if having the same big script in everything (everything meaning JUST the weapons) is bad for performance or not because its very easy for me to do and ive worked like this for a while now
No it is not please stop spreading misinformation @isaiahbur there is nothing wrong with your current implementation, some people may go the modular route but your doing it just fine.
They aren’t “bad” but they aren’t very ideal especially if you are running a fairly heavy server and the gun’s script is duplicated so many times for each player.
well the thing is im only using one script for tools and just cloning this script into all the tools in the storage upon the game starting. so its very organized im just wondering about performance.