This question is pretty short. Is it more efficient to make store an AnimationTrack and keep using it, or is it more efficient to use LoadAnimation the entire time?
Hello OminousVibes!
I am pretty sure ROBLOX does internal caching when it comes to animations, that is why many games will run :LoadAnimation() on each animation at the start of the game so that when it comes time to load the animations again, they are already pre-loaded.
I do not think it would cost any noticable performant tax to call :LoadAnimation() each time rather than keeping a table of animation tracks.
3 Likes
Another small question (Sorry), should I destroy my animation tracks after the character dies? Will that be more performant?
Hello OminousVibes!
No, they are automatically collected as garbage when :Destroy() is called on the humanoid (when they die and respawn).
1 Like
Thank you, that is great to know!