Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How to make your humanoid root part stay with your player while playing an animation?

So I have an roll animation and when I play it the animation is fine but the humanoidrootpart won't move. So when The animation ends it is sets back to the humanoidrootpart. What do I do to make the humanrootpart go along with the animation? also here is my script

local animation = Instance.new("Animation")
animation.AnimationId = "http://www.roblox.com/Asset?ID=302850882"
while true do
local Humanoid = game.Players.LocalPlayer.Character.Humanoid
local animTrack = Humanoid:LoadAnimation(animation)
wait(10)
animTrack:Play()
end

Also this is just for testing the animation and seeing if there is a way to do this.

9 comments

0

I REALLY REALLY hope you get an answer because I had a simular question a while ago and never got an answer...

0

Is it in a LocalScript?

0

Yup.

0

If I to somehow attack the HumanoidRootPart to the torso it could work. i think.

0

No, the HRP is attached by default, I think.

0

the animation only moves the characters parts and not the HumanoidRootPart. I actually tried a refreshing script where I made the HumanoidRootPart Position as the torso but then the join brakes.

0

damn

0

Make the HumanoidRootParts CFrame the same as the torsos Cframe, Cframe doesnt break joints

0

@connor12260311 That would end up with double the movement -- prior to moving the HRP the final time, it'd be a frame before the finish position but the torso would have moved back to x studs away from the HRP

1 answer

There is currently no way to use ROBLOX animations to move the HumanoidRootPart. To move the whole character to a new location permanently and not have them return to their previous position, animate the torso so that its position is always at the center of the HRP (you can still rotate it), and then use a BodyMover (BodyVelocity, BodyForce, or BodyPosition) to move your character in the desired direction.

This discussion is preserved as it was. New answers, comments, and votes are closed.