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

How do I make the HumanoidRootPart follow the player while playing an animation?

Hello! So I am trying to animate a backflip animation for my Roblox game. The problem is that when the animation stops, the player slides back to it's original position(To the HumanoidRootPart). I'm wondering if it's possible to move the HumanoidRootPart to the acutal player while the animation is playing, and how would I do that?

2 comments

0

I would use MoveTo() to move the RootPart at the last frame to the end position.

0

How would I detect if it's the last frame?

1 answer

✓ Accepted answer
--R6
local plr = game.Players.LocalPlayer
local hrp = plr.HumanoidRootPart
local t = plr.Torso
--R15
local ut = plr.UpperTorso

--R6
while wait(0) do
hrp.CFrame = CFrame.new(t.Position)
hrp.Rotation = Vector3.new(t.Rotation)
end)

--R15
while wait(0) do
hrp.CFrame = CFrame.new(ut.Position)
hrp.Rotation = Vector3.new(ut.Rotation)
end)

This is a fast script i wrote so it may have errors

1 comment

0

It did work with some edits to it but it won't let me turn my character.

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