Animation instance or ID?

What is a better way to store animations?

  1. Using a module with IDs, and then using a function to dynamically create animation instances to load into the animator?
  2. Keeping animation instances somewhere and loading them when needed?

Option 1 would be cleaner in my case, but I dont know if it will be more performant.

Its better to use Animation Instances, mainly for Storage and uses in game, Usually using a ModuleScript just stores data of the animation, although it is cleaner, how are you going to apply it?

My thought process for this was that Animation instances only store the animation ID anyway, so I might as well store the animation ID in a ModuleScript (Since I already have one for configuration)

Though that might create the issue of multiple of the same animation being present at the same time, if I create them before calling :LoadAnimation

Animations do store Animations, but they are able to be applied with LoadAnimation

The only benefits to using Animations Instances I can think of are:

  • Storing Animations (duh)
  • Easy Use (Easy to Access depending on Location)
  • Ability to be Preloaded by ContentProvider (I think)