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

Making the player position equal to the position at the end of animation?

Asked by 3 years ago

Basically I have this animation and at the end of the animation your player is launched forward since it does a kick attack. However when the animation ends, the player gets reverted back to the Position they were before the kick animation played. I tried using HumanoidRootPart CFrame to set it equal to it at the end but there is two problems. One it's hard to tell if it actually is in the right position since when the animation ends and it runs the CFrame part of the script; it teleports you and has a black screen in between. Two the teleporting and black inbetween frame looks bad and doesn't flow well at all with the animation.

Here is the part of the code that functions off the end of the animation. The animation and code works perfectly fine, its just I need a solution to make it so your player position is exactly in the position of the end of animation, without the teleporting and black screen. So it can look smooth and seamless.

animtrack.Stopped:Connect(function() Punch:FireClient(Player,true) HumanoidRootPart.CFrame = HumanoidRootPart.CFrame*CFrame.new(0,0,-5) end)

Answer this question