How to make this part move slower

In a parkour game I am playing a vaulting animation, but the animation of course just plays on the same position, and to make character actually move forward, I do this.

vaultAnim:Play()
for i=1,10 do
	task.wait()
	root.CFrame += root.CFrame.LookVector* 1.001
end						

It works, but the character moves forward too fast, no matter how much I change the i, or * 1.001 values.

How can I control the speed with which it moves?

I dont want to use tweenService as creating tweenservice everytime player vaults would be too heavy on performance.

Alternatively you can tell me how else can I move the character along with animation. Thank you in advance!

vaultAnim:Play()
for i=1,10 do
	task.wait(0.1)
	root.CFrame += root.CFrame.LookVector* 1.001
end		

Try putting some value within “task.wait()” to wait a little more before the player moves forward.
0.03 seconds wait is the default so try putting something higher like 0.1. If it seems too slow try 0.07 or something.

I’ve already tried it, it makes the movement glitchy/laggy, as predicted

You could try using BodyVelocity but it would just push the player in a direction. I’m not sure if that would work out for you.
And if it matches the speed and you want to stop it from being glitchy/laggy you could use lerp:
Like so:

root.CFrame = root.CFrame:Lerp(root.CFrame+ root.CFrame.LookVector*1.001,1)

This is even glitchier than without lerp. BodyVelocity wouldn’t work in my case

Maybe use TweenService??

No clue.

1 Like

That is exactly what Im doing, read the post more carefully, the question is entirely different

And you’ve also tried setting i to 0.5 or lower?

Root.CFrame += Root.CFrame.LookVector * 0.01

You can decrease the multiplier below 1 since you’re adding the product to the Root's CFrame.

2 Likes