[Version 1.1.4.1] Better Roblox Animate Script (R15 and R6)

As you know, when a player’s character spawns, Roblox creates an inside character script called “Animate”. This script contains information on how characters’s animations should work.
But roblox’s animate script logic and code looking is kind of bad (really bad).

Thats why I decided to rewrite this script, removing unnecessary elements and code logic

My Animate script works like the original one in functionality, but much simpler.

It also includes:

1. R15 and R6 Support

Script automaticly determines which animations should be used for the character by checking Humanoid.RigType

2. Ability to disable toolnone animation

To disable ToolNone animation (default animtaion when player equip tool), just set attribute Tool:SetAttribute("NoToolNone", true)

3. Fixes tool speed glitch

When you equip tool while emoting your сenter of character mass changes and let to move really fast while jumping (example), with this Animate script it no longer possible

4. Play animation backwards

While player in first person mode or using shiftlock and walking, jumping or running (climbing using own logic, but it works too), to Backward-Right, Backward-Left or Backward, animation will be played reversed

P.S If you want to disable it, just set LocalScript:SetAttribute(“UseDynamicWalk”, false)

5. Change animation in real time

How to change any animation, watch here

How to add/remove animation, watch here

To change how often animation will be playing use Animation:SetAttribute(“Weight”, YOUR_NUMBER)
1 = Rare, 10 = Often, 20 = Really often

↓ You can get Better Animate script here ↓

For Player

For NPC

P.S Feel free to feedback

48 Likes

I kinda like what you done here. Might be useful for people who are looking to have a more simple animated script. But my tip is to try and make this work for all avatar sizes as Roblox animated script works on all avatars.

My version supports this too, simply it is a modified version of the script from Roblox

Calling /e dance without number argument instead of playing random animation throw error
изображение
изображение

2 Likes

P.S.
You have emotes listed in a dictionary, and it missing dance without number
изображение
and in function PlayRadnomDance


you checking that it it a “dance”

2 Likes

Thanks for report, fixed in new version!

Could you please try to improve the R6 Animate script while you’re at it?
That would be nice for my game.

Only If I have free time, reading scripts from Roblox is a pain

If you tried your 8 directional animation with original “Animate” script then it should work

UPDATE 1.0.1
– Added real time changing animations
(If you change Animation’s (walk, run, fall, jump, climb, idle, sit, swim, swimidle) AnimationId in “Animate” script, it will immediately update Animation)
– Some improvements

After some digging, i found that we shouldn’t change animations in real time, roblox animation replication does not support that and i can’t really do anything about it.
(Client-Server view looks different)

Update 1.1
– Added anti-speed tool glitch fix
(If you equip while emoting your сenter of the character changes and player able to move really fast, with this fix it no longer possible)
– Added server script creating non-existing animations (cheer, wave, etc)
– Code logic improvements
– Bug fixes

2 Likes

Update 1.1.0.1
– Added script:SetAttribute() for RunSpeed and AnimSpeed (Can be used for properly crouch / crawl system)
– Small bug fixes

3 Likes

Update 1.1.1
– Added dynamic run/walk animation play
(If player in first person mode or using shiftlock and goes to BackwardRight, BackwardLeft or Backward, animation will be played reversed
P.S if you want to disable it just set If you want to disable it, then set the value of the UseDynamicWalk attribute to false in the script.)

– Rewrited toolnone logic
(I learned that it is better not to store animations in the tool itself, so if you want to disable toolnone animation, then set the “HoldAnim” attribute to the tool (the default value is false))

1 Like

Update 1.1.2

Added R6 Support (yay!)
Weight system now uses SetAttribute (Not Instance.new(“StringValue”))
Removed “Non-repetitive random /e dance” (LocalPlayer.Chatted:Connect() just stopped firing, TextChatService can’t detect “/e dance”)

3 Likes

Update 1.1.3

Added: Real time animation changing (yay!!!) ← Video how to use this

Added: Add/remove animations in real timeVideo how to use this

If you want to set how often animation will be played, use Animation:SetAttribute(“Weight”, YOUR_NUMBER)
1 = Rare,
10 = Often,
20 = Really Often
P.s you can change this Attribute at any time (Default value = 1)

Updated ToolNone logic, to disable ToolNone use Tool:SetAttribute(“NoToolNone”, true)

Replaced all StringValue with Folder (except: pose and mood (you dont even need this)), NumberValue with SetAttribute()

Updated code logic, now its more simpler

Update 1.1.3.1

Added custom Humanoid and Animator name support

Updated LoadAnimation() method, it will use Animator if it exist

CurrentAnimationInstance bug fix

Code is more cleaner

2 Likes

Update 1.1.3.2

Fixed Dynamic run/walk

Updated SetAnimationSpeed()

2 Likes

Update 1.1.3.3

Fixed Swim-Idle animation not playing correctly

Fixed Climb with InverseSystem playing incorrectly
Roblox’s Humanoid.Climbing:Connect() gives positive and negative numbers

Fixed Humanoid.FallingDown:Connect()
Forgot that in my code fall animation working only when you jump

Code cleaning

image

1 Like

Can we have an animation playground game? I’m usually on Mobile and sometimes I don’t have the time to check things on my laptop. Thanks.