MotionX
Extensible Animation Manager for Roblox -- Anything about animations, in one place.
Animation Registration
Register and play animations by name with customizable priorities
Playback Control
Pause, resume, and stop animations with dynamic speed adjustment
State Tracking
Track currently playing or paused animations with built-in status methods
What is MotionX?
Installation
You can download MotionX from this [link]
After downloading, drag the Module into StarterPlayerScripts
or
StarterCharacterScripts
.
Getting Started
Creating a new Instance
After downloading MotionX, let's initialize it so it's ready to use.
To use MotionX, you first need to create an instance and connect it to your character. Here's how:
Start by requiring MotionX
local MotionX = require(script.Parent.MotionX)
The .new()
method creates a new MotionX Controller for your character.
After requiring MotionX, we can use
.new()
to crate a new instance.
Before that, make sure you have a character already.
local Players = game:GetService("Players")
local player = Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local characterAnimator = MotionX.new(character)
Your character must include an
Animator
, or MotionX will not be able to play animations.
Registering an animation
Now we can start registering animations, to register a new animation we can use the
:RegisterNew()
method.
local characterAnimator = MotionX.new(character)
characterAnimator:RegisterNew("Jump", 1234567890, Enum.AnimationPriority.Movement)
Look at :RegisterNew()
to
view the method more in depth.
Playing & Stopping an animation
To play an animation use the :Play()
method.
characterAnimator:Play("Jump")
This plays the "Jump"
animation once. If you want it to loop, simply pass
true
as the second argument:
characterAnimator:Play("Jump", true) -- loops the animation
Stopping an animation
To stop an animation use the :Stop()
method.
characterAnimator:Stop("Jump")
Stopping & Resuming an animation
To pause an animation use the :Pause()
method.
characterAnimator:Pause("Jump")
To resume an animation use the :Resume()
method.
characterAnimator:Resume("Jump")
You can also call :Play() to resume your animation!
Setting the speed of an Animation
To set the speed of an animation use the :SetSpeed()
method.
characterAnimator:SetSpeed("Jump", 0.3)
Stopping all animations, Unregistering an animation and cleanup
Stopping all animations
To stop all animations use the :StopAll()
method.
characterAnimator:StopAll()
This will stop all currently running animations.
If you want to only stop animations from one group, you can pass the group name as the first paramater.
Unregistering Animations
To un-register an animation use the :Remove()
method.
characterAnimator:Remove("Jump")
This will un-register the animation.
Cleanup
To remove the entire MotionX Instance entirely use the :Destroy()
method.
characterAnimator:Destroy()
isPlaying(), isPaused(), GetPlaying(), GetGroup()
All of these methods basically do the same things, they either return true
or false
depending on the current state
--Example usage:
characterAnimator:isPlaying("Jump") -- returns true if is playing, returns fale is isn't playing
On the other hand, for GetPlaying()
and GetGroup()
:
GetPlaying - It returns a table with the names of the animations.
--Example usage:
characterAnimator:GetPlaying() -- returns a table with all names of the animations.
GetGroup - It returns the group name of an animation.
--Example usage:
characterAnimator:GetGroup("Jump") -- returns the group name (Default is Global).
Binding Markers
To bind a marker or multiple markers use the :BindMarkers()
method.
characterAnimator:BindMarkers("Jump", {
land = function()
print("Landed!")
end,
})
API Reference
.new() [Constructor] [Static]
Creates a new instance of MotionX.
Paramaters
:RegisterNew() [Instance]
Register a new animation.
Paramaters
:Remove() [Instance]
Remove an animation.
Paramaters
:Play() [Instance]
Play/Resume an animation.
Paramaters
:Stop() [Instance]
Stop an animation.
Paramaters
:StopAll() [Instance]
Stops all animations.
Paramaters
:Pause() [Instance]
Pause an animation.
Paramaters
:Resume() [Instance]
Resume an animation.
Paramaters
:BindMarkers() [Instance]
Binds a marker or multiple markers to a function.
Paramaters
:SetSpeed() [Instance]
Changes the playback speed of an animation.
Paramaters
:Destroy() [Instance]
Cleanup function.
:isPlaying() [Instance] [Read Only]
Checks if a animation is playing.
Paramaters
Returns
false
or true
:isPaused() [Instance] [Read Only]
Checks if a animation is paused.
Paramaters
Returns
false
or true
:GetPlaying() [Instance] [Read Only]
Returns what animations are playing.
Returns
:GetGroup() [Instance] [Read Only]
Returns the group of an animation.
Paramaters
Returns
Change Logs
20.07.2025
New:
Added a new groupping feature! (suggested by BreezeOnTheDoor)
Added auto-cleanup when you delete your character
Added 1 new read only method: ':GetGroup()
'
Added 1 new instance method: ':BindMarkers()
'
Changes:
Changed ':Play()
' method to include adding a fade time
Changed ':RegisterNew()
' method to include adding a group
Changed ':GetGroup()
' method to include a group paramater for stopping all animations in a group.
19.07.2025
Release day!