A lightweight wrapper class for Roblox’s Animator object.
It simplifies loading, storing, and playing animation tracks on a Humanoid, while keeping your animation logic organized and easy to maintain.
Wally:
[dependencies]
animation = "sap0bombado/animation@1.0.0"Add the module to your project then require it:
local Animation = require(path.to.Animation)local animationController = Animation.new(character, {
character.Animations.Idle,
character.Animations.Run,
})
animationController:playAnimation("Idle")Creates a new wrapper bound to the character’s Humanoid → Animator.
Optionally loads animations on initialization.
Loads a single animation instance and stores its corresponding track. Throws if the animation name is already loaded.
Loads multiple animation instances at once.
Returns the stored animation track for the given name, or nil if not loaded.
Checks whether the animation has already been loaded.
Plays an already-loaded animation track.
Stops all playing tracks and destroys them. Call this when cleaning up the object (e.g., character death or script shutdown).