Anima is a lightweight animation system for Roblox that keeps animations predictable,
blended, and under control.
No more priority fights. No more Animate chaos.
Use what you need:
Blend controllers; State machines; Cached playback
Everything optional. Everything clean.
I like the module, but I think it’s a bit too small. but if im going to have an entire module to handle animations, then I would want it to have some unique features that I wouldnt have to put in every other script.
In a movement module I made(not public, just for myself) I added a variable called a globalSpeedMultiplier, I made it so if going up slopes for example; it would slow down the speed of every animation playing. if i’m going to have a module specifically for animations, I would want it to have features that make it different than just using the regular roblox api
I’m like 80% finished with the new update, I will need to do further tests and debugging otherwise its going okay. In terms of use-complexity it should be easier due to the easy to read comments I’ve added to the functions.
Really great module - looking forward to using this in future projects.
If I’m not mistaken, does :cache() allow you to preload animations? And AutoExpire() allows me to make animations which cleanup really fast, like punching? Seems like a really great module.
When you call :Cache(), it:
1. Creates AnimationTracks for ALL animations in the folder
2. Preloads them via animator:LoadAnimation()
3. Stores them in self.animationTracks for instant playback
This means when you later call :PlayAnimation(), it uses the pre-cached track instead of loading on-demand, which is much faster.
AutoExpire() for Quick Cleanup
AutoExpire() is perfect for short-lived animations like punching! Here’s an example
-- Create handler just for punch animation
local punchAnima = Anima.new(punchAnimFolder, player)
punchAnima:PlayAnimation("QuickPunch")
punchAnima:AutoExpire(2) -- Cleanup after 2 seconds
-- Handler will automatically:
-- 1. Stop all animations after 2 seconds
-- 2. Destroy itself and free all resources
-- 3. Disconnect all event connections
Thanks for your appreciation towards this module, I will try to update it soon with whatever features cross my mind.
Yes, Anima handles replication when used properly! since Anima is designed to manage animations for a specific player (typically the LocalPlayer), when you play animations on your own character from a LocalScript, other players will see them automatically. However, Anima doesn’t include any networking code for cross-player animation control. If you need to animate other players’ characters or want server-validated animations, you’d need to:
Run Anima server-side, or
Add your own RemoteEvents for client-to-server communication
For most use cases (animating your own character), client-side Anima replicates perfectly!
i like the new changes, auto expire is definitely useful for a game full of animations such as cutscenes or even a lot of fighting animations.
if i played an animation, lets say “kick” that takes 3 seconds to play, and made it auto expire in 2 seconds, but in one second it will play again, maybe a glitch. something like that wont bug out the module, it has error handling right?
The module has limited error handling for this edge case. It might work, but could cause issues if you try to use the handler after AutoExpire triggers.
Hey! This part of code is giving me an error and i had to remove it.
It doesen’t recognize the .Loaded .
if not track.Length or track.Length <= 0 then
track.Loaded:Wait()
if not track.Length or track.Length <= 0 then
warn(`[PlayAnimation] Track for "{name}" has invalid length after loading`)
return nil
end
end