Roblox-animation-transfer: Automatically transfer animations between users and groups


#1

roblox-animation-transfer is a command line utility that allows you to transfer animations between owners in bulk. This tool was born out of necessity because unlike other asset types on Roblox, animations are locked to games owned by the owner of the animation.

Importing and re-exporting every single animation in my games started to get really old, so I made this tool to automate the entire process.

Usage

Pro-tip: The following examples make use of the npx command, which is automatically included when you install node.js. npx allows you to run commands from packages without needing to actually install them on your system. As long as you have node.js installed, you can run these commands directly and they’ll just work.

.ROBLOSECURITY

In order to upload animations, the .ROBLOSECURITY login cookie from Roblox.com is required. The account that the cookie belongs to must have permission to upload animations on the destination group. It is recommended that you use an alternate account for this process just to be safe.

For these examples, we will assume that you’ve stored your cookie in an environment variable called ROBLOSECURITY.

In bash, that looks like this:
$ export ROBLOSECURITY=[YOUR COOKIE HERE]

And in PowerShell:
$ $env:ROBLOSECURITY="[YOUR COOKIE HERE]"

Animation List Files

This tool reads in text files that contain a list of animations to upload. In addition to creating them manually, the tool can generate them from a user or a group.

The format is simple: each line begins with the animation ID followed by a space, and the remaining text on the line is used as the animation title.

12345 animation name
23423451 second animation name
232323 third animation name

You can generate a file with all animations owned by the logged in user or a group ID with the --list/-l option.

$ npx roblox-animation-transfer --user --list --outFile animations.txt will save the list in a file named animations.txt. You can then manually sift this file to only include the animations you want if necessary.

You can omit the --outFile/-o option, in which case the list is written to stdout.

You could generate a list from a group instead of the logged in user by using the --group [id] option.

Transferring animations

Once you have obtained a list file, either through creating it manually or generating one, you can use it to transfer animations from one owner to another.

$ npx roblox-animation-transfer --inFile animations.txt --group 12345

This will download and re-upload all of the animations from animations.txt to the new owner. This generates a new animation list file written to stdout.

You can specify an --outFile here as well to write the new list to a file instead of stdout. If you omit the --inFile, then stdin is used for the input file.

All together now

Because roblox-animation-transfer can operate purely on stdin and stdout, transferring all animations between two groups is as simple as just one command:

  • $ npx roblox-animation-transfer -g 12345 -l | npx roblox-animation-transfer -g 67890

In the above example, all animations from group id 12345 will be transferred to group id 67890.

Notes

  • If you really wanted to make your game versatile, you could have a script that just maps names to IDs, and then you could have that script consume the output file, since the animations in the output file will always be in the same order as the input file.
  • If an animation fails to upload for whatever reason, the tool will retry up to five times before giving up.
  • If you want to be a real hacker man, then you can just use cat animations.txt | npx roblox-animation-transfer -g 67890 > newAnimations.txt instead of the inFile and outFile switches, which just exist for simplicity.
  • You could upload animations to multiple groups at once by just piping the commands together: cat animations.txt | npx roblox-animation-transfer -g 123 | npx roblox-animation-transfer -g 456 | npx roblox-animation-transfer -g 789

Closing

If you encounter any issues or have any questions feel free to reply here or create an issue on the GitHub repository.

I hope this tool saves you all from hours of clicking and lets you spend more time actually working on your game! :wink:


#2

I did create a feature request for the ability to atleast import published animations quicker, but it could be a while before that even has a possibility of happening. Thanks again for making life easier. Very useful tool.