How to convert CFrame animations into Animation Tracks?

Hello.

I am currently questioning on how I could convert CFrame lerp animations to actual normal roblox animation tracks that are possible to export to Roblox? I have some scripts that use CFrames and I need a way to convert them into a animation track and upload it so my players are able to use them.

By animation objects, I mean this:

Here’s an example:

head.C0 = clerp(head.C0, CFrame.new(0, 1, 0) * ang(rad(70-cos(tick()*2)), rad(180), 0) * ang(rad(rng(-5,5)), rad(rng(-5,5)), rad(rng(-5,5))), spd)
torso.C0 = clerp(torso.C0, CFrame.new(0, -0.1+sin(tick()*2)/10, 0) * ang(rad(65-sin(tick()*2)*2), rad(-180), 0), spd)
leftleg.C0 = clerp(leftleg.C0, CFrame.new(-1, -1-sin(tick()*2)/10, 0) * ang(rad(25+sin(tick()*2)*2), rad(-90), 0) * ang(rad(-2), 0, 0), spd)
rightleg.C0 = clerp(rightleg.C0, CFrame.new(1, -1-sin(tick()*2)/10, 0) * ang(rad(25+sin(tick()*2)*2), rad(90), 0) * ang(rad(-2), 0, 0), spd)
rightarm.C0 = clerp(rightarm.C0, CFrame.new(1, 0.5, 0) * ang(rad(25+sin(tick()*2)*2), rad(90), rad(0)) * ang(rad(-4+cos(tick()*2)*4+rng(-5,5)), rad(rng(-5,5)), rad(rng(-5,5))), spd)
leftarm.C0 = clerp(leftarm.C0, CFrame.new(-1, 0.5, 0) * ang(rad(25+sin(tick()*3)*2), rad(-90), rad(0)) * ang(rad(-4+cos(tick()*2)*4+rng(-5,5)), rad(rng(-5,5)), rad(rng(-5,5))), spd)

Yes, I know it’s pretty complex, but does anyone know how to do this, or is there any plugin that can record each position and rotation from the character’s joints, and immediately convert it into a animation track object with all keyframes?

If anyone has any solutions or anything to suggest I could use, please do! I have barely been getting answered recently.

1 Like

No, I’ve personally never seen a CFrame → Animation script/plugin. Goodluck.

2 Likes

You would have to find a value for time to replace tick(), and write a script to not only create a keyframe inside a keyframesequeunce but also populate that keyframe with poses and (subposes except they are just parented under poses and r rlly just poses) that match roblox’s structure, I could do it but you need to find the value to sample every so often for your rotations, then call a function to write that to a table or so then at the end when the loop is over or when you want it to be over log the final cframe WHICH SHOULD BE THE ORIGNAL CFRAME SO IT LOOPS and then create all poses you have an animation

tldr; find a value where with your current animation, you can find a loop spot for all c0’s to go back to when they initially start, I recommend going ahead and creating a value outside of your current loop called ‘start’ and do

local start = tick()

and adjust all your current c0’s from tick() to tick() - start so you can start from 0.

this is really niche case but find those the time value that can be plugged in and i will write a script to render it out for you.

edit; you lose all rng if you bake it to a animation track unless you overcomplicate it and render out many variations of animation x and play it at random

1 Like