OOP module - KeyFrameSequence to animation

It pisses me off forever to post garbage animations to an account - use this module

Background:
the module is not completely mine, but I had a hand in creating it.
Today I was rummaging through the toolbox and suddenly I come across a very powerful module. For some reason, it didn’t work (I had to redo it completely and remove unnecessary parts)
After fixing it, I found a few more bugs, for example, that after the first :Play() everything broke. I rewrote about 40 lines and everything was fixed. I added a masterpiece of typing, improved the legacy to add hints for “heirs” (thanks to Cordy for helping with this) and that was the end of my work. Except that I also deleted all sorts of stuff (there were about 300 extra lines of code, lol)
In any case, the module has been fixed.

Theoretically, this is useful because your friends will see this animation.

How To Use:
Everything is written in the code:

local AnimationModule = require( game.ReplicatedStorage.Modules.Animator ) -- Set your path
local Animator = AnimationModule.new(game.Workspace:WaitForChild("Rig").Humanoid) -- Your rig (you can also use the player)
local Animation = Animator:LoadAnimation(game.ReplicatedStorage.Animations.RigAnim) -- Path to KeyFrameSequence
-- IMPORTANT: Remember to remove RigData from your KeyFrameSequence


---------------------------METHODS
Animation:Play(... , ... , ...) -- OPTIONAL you can specify FadeTime,Weight,Speed inside
Animation:Stop(... ::number) -- OPTIONAL you can specify FadeTime inside
Animation:AdjustSpeed(... ::number)
Animation:AdjustWeight(...::number) -- + OPTIONAL you can specify FadeTime

Animator:Destroy() --[[ TODO ALWAYS call after Animation.Stopped:Wait() !!!]]
---------------------------METHODS

------------------------------------------------
print(Animation.Name::string)
print(Animation.Speed::number)
print(Animation.Length::number)
print(Animation.IsPlaying::BoolValue)
print(Animation.Looped::BoolValue) -- Can be changed (assigned to)
------------------------------------------------

------------------------------------------------SIGNALS
print("Wait","Connect","Once","Fire")
print(Animation.DidLoop)
print(Animation.Stopped)
print(Animation.Ended)
------------------------------------------------SIGNALS

Animation.Priority = Enum.AnimationPriority:GetEnumItems()
  • Remember, if you use this module for the “wrong purposes”, your account will be deleted, even considering that the animation has not been published!

Link to the module:
(https://create.roblox.com/store/asset/18768998208/KeyFrameSequence-TO-Animation-module)

4 Likes