[V3] [Proof of concept] Animation scaling for characters

Since Roblox refuses to add animation scaling functions (for some reason), I took matters into my own hands.

In my game, you play with R6 characters, and are able to morph into characters with a smaller/larger scale.
The problem with this is that animation offsets do not scale to your rig size.

So, I present to you: a proof of concept for solving this!


The AddAnimRig script in ServerScriptService adds a CollectionService tag to your player character. The name of that tag is specified in ReplicatedStorage.AnimationScaleTag. It also adds a ‚ÄúScale‚ÄĚ attribute to your character, which controls the scale of the animations on that rig.

You can change the animation scale by changing the ‚ÄúScale‚ÄĚ attribute on the character.

The HandleAnimations localscript in StarterPlayerScripts controls all the animation scaling logic. It will loop through every character (including NPCs) that have the CollectionService tag specified in ReplicatedStorage.AnimationScaleTag, and set all the joint offsets.

Everything else is as it always is. You dont need any custom function to play animations on characters that have scaled animations. Just call :LoadAnimation on the animator inside the humanoid.

Place file: Scaleable Animations V3.rbxl (48.6 KB)

Gotchas:


  • You dont need a starter character, I just added one since you cant change the default rig type on an unpublished game.
  • This should technically work with any character, including R15 and custom characters.
  • The animation scale on characters does not replicate to the server, however it does replicate to other clients. (sort of, every client calculates it separately)
  • Code to downscale your CHARACTER is not included here, only scaling for animations.
  • This supports bones.
  • This has not been tested extensively, so it might be broken, maybe dont use for live games (yet?)
  • You can use this to scale animations on non-player characters.
  • There is no per-animation scaling. Its probably not possible.
  • Some built-in function like AnimationTrack:AdjustScale() would be way better than this, if it existed.
8 Likes

A little bit of a late reply, but this does not work with R15.

When I tested it, your character just broke apart and you are unable to do anything. Kinda weird how R6 and R15 behave differently in this situation.

Have you tried this with an npc, that uses an R6 Humanoid, but might have more parts than a normal R6?

Also, have you tried it with animations that use bones?

1 Like

It does work with extra parts, however bone animations are not supported.

Playing animations on NPCs does technically work, but you might have to restructure the code a little bit, since right now the script only accounts for player characters.

I might update the place myself to account for these issues

EDIT: Getting bones to work was actually super easy, I will update the topic in a while with some other improvements

V2 Update!


  • Reworked the main module, now there is only 1, used by both the client and server
  • Now supports bones
  • You can scale animations on non-player characters now

Place file: Scaleable Animations V2.rbxl (64.3 KB)

1 Like

The link above doesnt work, is the link on the first post the same?

1 Like

Not sure what happened there, I fixed both of the links now

1 Like

Surprise! V3 Update!

I know right? I didnt see it coming either! Huge credit to this post for pointing out that you CAN actually set the Transform property without it resetting instantly!


  • There is no module now. There is just a ‚ÄúHandleAnimations‚ÄĚ localscript in PlayerScripts, which handles everything for you.
  • The Animation Rigs inside your character are now no longer needed.
  • You dont need to do any magic for playing animations now. Just play them as you normally would, on your character animator inside the humanoid.
  • There is a new ‚ÄúAnimationScaleTag‚ÄĚ value in ReplicatedStorage. It contains the name of the CollectionService tag that is used to scale animations. You can remove it and hardcode it if you want. Any character model that has that tag, and has a ‚ÄúScale‚ÄĚ attribute will have its animations scaled.
  • This means that this SHOULD work with R15 now, and custom characters as well.

Place file: Scaleable Animations V3.rbxl (48.6 KB)

2 Likes