Animalib is an animation module tailored for Roblox, streamlining animation tasks and freeing up your time for game creation, rather than dealing with excessive code.
This is still under development and not suitable for production. Please proceed with caution if you choose to use it.
Installing AnimaLib is as simple as dropping the module into your game. You can also be used with a Rojo workflow.
- Download the latest release of AnimaLib from Roblox.
- Insert AnimaLib into ReplicatedStorage.
- Add AnimaLib to your
wally.toml
dependencies:AnimaLib = "Animalib = "thebetterdark/animalib@^0.2"
- Run
wally update
to install the new dependency. - Require AnimaLib like any other module from Wally.
The following example demonstrates how to create an animation and play it on a Humanoid.
local AnimaLib = require(game:GetService("ReplicatedStorage").Packages.AnimaLib)
local humanoid = game:GetService("Players").LocalPlayer.Character.Humanoid
local animator = AnimaLib.new(humanoid.Animator)
animator:LoadAnimation("TestAnimation", "rbxassetid://123456789")
animator:PlayAnimation("TestAnimation")
You are also able to use AnimaLib with a AnimationController by passing the controller as the first argument to AnimaLib.new()
.
local AnimaLib = require(game:GetService("ReplicatedStorage").Packages.AnimaLib)
local animationController = somePath.AnimationController
local animator = AnimaLib.new(animationController.Animator)
animator:LoadAnimation("TestAnimation", "rbxassetid://123456789")
animator:PlayAnimation("TestAnimation")
Contributions to Animalib are welcome! To contribute, please fork the repository and submit a pull request with your changes. Before submitting a pull request, please ensure that your code is following Roblox Lua Style Guide.