Hello everyone, I thought I’d want to share this with you guys since there isnt many resources about this
Basically what this is is, it loads keyframesequences as if they were an “animation” and you can play it, stop it
I havent included much of the features that the roblox one has because I got a little tired and thought I’d share this, I’ll still make the rest but I’ll decide if I want to share the better one, based on your guys’ feedback! So if you guys like this and want me to release the soon-to-come better version, please drop a heart
There isnt really much to share or talk about this script since it’s very similiar to the roblox version so I’ll give out examples
Lets say we have a run animation to play with the KeyframeSequence being in a folder called “Animations” inside a player or an npc.
We simply write this code…
local AnimationHandler = require(script.AnimationHandler)
local CharacterObj = AnimationHandler:CreateCharacterObject(script.Parent) --Makes the character into an object-type table that basically operates with runtime and other global things, think it like an "animator" instance where you load animations into it
local Run = AnimationHandler:LoadAnimation(CharacterObj, script.Parent.Animations.RunFast) --We put our character object and our keyframe sequence
Run:Play() --And we simply play it!
Yes, it is as simple as that! This module can play all kinds of animations except easing styles. I am still working on easing styles, they arent implimented because of their sheer amount.
Aside that, it can easily handle custom easing styles like in moon animator and even blender animations where keyframes are placed frame by frame!
I’ve also made priorities however they are limb by limb, though I will add multiple modes to this in the potentially-soon-to-come version.
What do I mean limb by limb? If you play an animation that only animates the left arm and have it as action4, and another and have it as right arm and priority as action3, both will play because they dont relate to each other.
Almost forgot to mention but this also has looping, wouldnt really be an animationhandler without looped animations, would it?
I was thinking of adding :Wait() aswell but I’ve worked on this for 4 hours so I decided to drop it for now, I will definitely add that though!
You can use this module to make all kinds of goofy things in the games you dev in without having to reupload animations or whatever. This shouldnt be used for practicality but only for messing around. Atleast that’s what I recommend.
Anyways, that’s all. You can download the module here: