KeyframePlayer v1.6
Hello! I made a module, based mainly on animations and NPCs in mind. Allowing to play any animation at any given time, this module is able to be used in situations where you don’t own a place but you still would like to play your animations, such as an NPC you created or a ViewModel that you would like to be animated. Sadly anything such as a tool or layered animations like so doesn’t work at all, anything that doesn’t have animations by default will work. Feel free to show off anything you make with this module as well as if you find any bugs, feel free to also report them here.
Here’s some videos to show it off, might not be obvious but the animations are loaded KeyframeSequences.
Sample Code
local AnimsBase = require(game:GetService("ServerStorage").KeyframePlayer)
local Animation = AnimsBase:LoadAnimation(script.Parent.Humanoid, script.KeyframeSequence)
task.wait(2)
Animation:AdjustSpeed(2)
Animation:Play()
task.wait(1)
Animation:Stop()
Links
Upsides
-
Able to share animations and play them without having to be reuploaded.
-
Easily modifiable code to fix any bugs that you happen to encounter.
-
Animations are kept safe inside of the humanoid.
Downsides
-
Unable to overlap 2 KeyframeSequences at once, stops other animation.
-
Unable to play over in-game animations.
-
Not optimized.
-
Unable to reset back to normal position normally without modifying the source code.
Bugs
-
Laggy reversed and slowed animations when reversed.
-
Somewhat jittery, but sort of fixed.
To do list
-
Optimizing the “Play” function, cutting down on clones and loops.
-
Fix the noticeable tween difference upon being reversed.
-
Allow “priorities” for animations, along with overlapping/layered animations.
Done
-
Being able to set the speed of the animation.Feature was added in v1.5.