Root Motion Help

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? The humanoidrootpart to move and rotate with the lower torso

  2. What is the issue? so everytime the animation plays (its a dash animation) the player slides back after playing the anim instead of staying

  3. What solutions have you tried so far? Did you look for solutions on the Creator Hub? yes i have looked at alot of root motion solutions none have worked

anyone know how to do this?

3 Likes

When you made the animation, if you moved the torso inside the animation for dash movement instead of using some kind of body mover and keeping the torso in the same spot, you could either reanimate it and use BodyVelocity or LinearVelocity, or if you don’t feel like changing the animation, theres a really bad method you could do which is to make 2 animation markers, 1 right before the end as the character stops moving and 1 right at the end of the animation, then when marker 1 is reached, store the current CFrame of t he players torso, and when marker 2 is reached, pivot the character to the stored CFrame. That’s a really awful method though, please consider switching to real velocity

your better option is to remove the forward movement in the animation and just apply a body mover when the animation is playing, no root motion stuf

yes i agree thats a good idea for dashin and stuff like that but what about like fighting scenes like a cutscene where 2 players are fighting and when its over the player slides back to the original position

you log the position of the torso at the end of the animation, stop the animation, and move the root part to that position

Just to clarify, inside this cutscene animation you are moving also the root part or just the torso?

well if he says the characters slide back into position then we can assume the root part is stationary, as thats where the torso returns to

so that worked with tweening but the character like moves out the players view for like other anims and then when it ends the camera catches up to the hmrp is there any way that i could animate the hmrp or is there a rootmotion module or anything?

i dont understand what youre saying here, maybe a video of it could help

You can use a task.wait, then teleport the Root Part to the Lower Torso just before the animation ends

DashAnimation:Play()

task.wait(DashAnimation.Length - 0.05)
RunService.PreAnimation:Wait()

RootPart.CFrame = LowerTorso.CFrame

DashAnimation:Stop(0)

so i do not know how to upload videos on forum but what im trying to achieve is also with other anims like walk animations and attack ones too like this https://www.youtube.com/watch?v=qpAoqSHvMUs

With the following code:

ClimbAnim:Play()

task.wait(ClimbAnim.Length - 1/60)
RunService.PreAnimation:Wait()

ClimbAnim:Stop(0)

RootPart.CFrame = LowerTorso.CFrame * LowerTorso.Root.C0:Inverse()

Final result:

Climbing animation:

i just tried that but the animation isnt playing. i commented out :stop() and it played but no root motion

Try adding the following before you call :Play:

if DashAnim.Length == 0 then
  print("Waiting for animation to load...")
  DashAnim:GetPropertyChangedSignal("Length"):Wait()
end

Also, how long is your animation? And is your rig an R15 or R6 rig?

ima just not do rootmotion ill find a solution sometime but thanks alot for the help