I’m making a combat system, and don’t know what I should use to make performance / handling good.
Planning to use either Attributes, CollectionService, or a ModuleScript to handle the tags.
Which should I use?
I’m making a combat system, and don’t know what I should use to make performance / handling good.
Planning to use either Attributes, CollectionService, or a ModuleScript to handle the tags.
Which should I use?
All of those methods you said have different purposes. You should actually be using them all if it fits well.
For example, you tag a bunch of parts with a tag, then in a module script, initialize those parts and customize them with attributes you set.
It’s mostly for combat, it’d be a hassle to add them all. + will be using the same thing for all of the game.
If you’re trying to get the best performance out of objects that you want to store, you would have two options:
If you store these objects and have many module scripts that communicate already, it is best to create an array and add/remove objects as they are instanced within the script.
If they are not instanced within the script, the best option is CollectionService.