Rework the Animate Script

As a Roblox developer, it is currently too hard to make adjustments to the default Animate script and use it in a meaningful way. I would love to see a modular set up for the Animate script or creating its own service tasked with managing the default animations and adding new ones.

To me, the biggest problems with the current Animate script (view it here) are:

Difficulty changing default animations

Here’s a common way of changing animations:

Method 1 (I believe most commonly used)

Just posting a quote that explains it all pretty well.

One thing the code leaves out is that the Animation instances must be changed (children of the Animate script) as well.

Method 2 (per developer.roblox.com)

This is the second method, because the first seems more commonly used and I’ve seen people having issues changing animations with the following suggested code. Nonetheless, here it is below.

(Code goes in a server script)

local Players = game:GetService("Players")
 
local function onCharacterAdded(character)
	local humanoid = character:WaitForChild("Humanoid")
 
	for _, playingTracks in pairs(humanoid:GetPlayingAnimationTracks()) do
		playingTracks:Stop(0)
	end
 
	local animateScript = character:WaitForChild("Animate")
	animateScript.run.RunAnim.AnimationId = "rbxassetid://616163682"        -- Run
	animateScript.walk.WalkAnim.AnimationId = "rbxassetid://616168032"      -- Walk
	animateScript.jump.JumpAnim.AnimationId = "rbxassetid://616161997"      -- Jump
	animateScript.idle.Animation1.AnimationId = "rbxassetid://616158929"    -- Idle (Variation 1)
	animateScript.idle.Animation2.AnimationId = "rbxassetid://616160636"    -- Idle (Variation 2)
	animateScript.fall.FallAnim.AnimationId = "rbxassetid://616157476"      -- Fall
	animateScript.swim.Swim.AnimationId = "rbxassetid://616165109"          -- Swim (Active)
	animateScript.swimidle.SwimIdle.AnimationId = "rbxassetid://616166655"  -- Swim (Idle)
	animateScript.climb.ClimbAnim.AnimationId = "rbxassetid://616156119"    -- Climb
end
 
local function onPlayerAdded(player)
	player.CharacterAppearanceLoaded:Connect(onCharacterAdded)
end
 
Players.PlayerAdded:Connect(onPlayerAdded)

Animations should not take this much effort to change, especially as Roblox seems keen on improving and simplifying the ability to induce generic/default character aesthetics. Introducing a modular set up could greatly improve the ability of the individual developer to make quick changes with little to no programming knowledge as well.

Alternative Solutions Besides Changing the Animate Script
  1. Modifying HumanoidDescription to allow for the input of user created animations (currently only supports Avatar Shop/Catalog animation bundle component animations.
  2. Adding animation controls directly into Game Settings (currently the only setting for animation is Standard or Player Choice)

Animate is not as versatile as it seems intended to be

Animate references the animations for the normal linked sword and checks to see if the player is using tools. However, the Animate script seems to be pretty much hard coded to only work with the linked sword, or to rely on StringValues of animations within the tool itself. Most developers are beyond this and prefer to work with modular systems for readability and increased functionality. This is why many developers handle animations solely through the tool itself, rather than trying to make their tool compatible with the Animate script.

This wastes a potentially valuable resource and the ability to easily centralize animation control.

Animate allows few customization options, even to the default animations

Customization (or at least the ability to customize) is something sorely lacking in the current Animate script. Being able to customize animation Speed, Priority, TimePosition, Looped, etc. could all be properties that could be extremely useful depending on the circumstance. Being able to customize animations at the start of the game, or midway through, would be very useful (imagine a simple detail in a game, such as increasing the swim animation speed if the player was escaping from some bad entity without having to utilize a walkspeed change, being easily enabled with a quick function call).

_

If this issue is addressed, it would improve my development experience because code could be more streamlined and readable when making simple changes to animations. A modular or service based approach could introduce simple functions such as ChangeIdle(AnimationId, TableOfAnimationProperties) or ConfigureAnimation(etc.). This would greatly simplify this process and make a uniform animation provider accessible and preferable for scenarios such as tool animations, adding increased action animations, custom emotes, etc.

Please share your thoughts below.

26 Likes

Just thought I’d mention that because the Animate script is open source, Roblox is actually making it extremely versatile.

What I mean is, if you don’t like the Animate script you can always re-write it to act however you like. You are not limited by what Roblox gives you.

That’s just my 2 cents anyways.

3 Likes

While it’s true that the fact that the script is able to edited and is more beneficial than it just being innate engine behavior, to me, that doesn’t nearly qualify it as versatile. Just more versatile than having nothing. Developers shouldn’t have to constantly fork or even write their own Animate scripts, especially when the changes are often as simple as replacing animation ids (as stated before, the actual process to accomplish this is more lengthy than doing that)

The current Animate script does not seem to be as versatile as it could be, and making the script more versatile would be serious benefit for developers of all kinds (not just programmers). Stuff like animation handling (ex: processing animation weight, hard binding various animations to states, etc.) - sure, that makes sense not to be as versatile and changeable. However, things like the basic idle, run, and walk animations should not be difficult or even relatively difficult to change. These are things that increasing number of games are incorporating as the standard for development and animation rises across the platform.

Reworking the Animate script could be a huge step towards increasing developer (of all kinds) really take control of animations. Whether this is customizing the animations themselves, changing properties such as animation priority, speed, or simply centralizing all tool animations under one script rather than many, the possibilities could really be numerous depending on how versatile and configurable the Animate script was reworked.

2 Likes