Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
3

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

Asked by 9 years ago

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.

0
I REALLY REALLY hope you get an answer because I had a simular question a while ago and never got an answer... Perci1 4988 — 9y
0
Is it in a LocalScript? TheDeadlyPanther 2460 — 9y
0
Yup. friendlyBoy15 15 — 9y
0
If I to somehow attack the HumanoidRootPart to the torso it could work. i think. friendlyBoy15 15 — 9y
View all comments (5 more)
0
No, the HRP is attached by default, I think. TheDeadlyPanther 2460 — 9y
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. friendlyBoy15 15 — 9y
0
damn TheDeadlyPanther 2460 — 9y
0
Make the HumanoidRootParts CFrame the same as the torsos Cframe, Cframe doesnt break joints connor12260311 383 — 9y
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 EchoReaper 290 — 9y

1 answer

Log in to vote
1
Answered by 9 years ago

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.

Ad

Answer this question