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

How do I use CFrame:lerp for animating?

Asked by
ZarceI 0
7 years ago

I wanna animate with CFrame:lerp for a smooth look, I don't know where to look though or learn. Please help scriptinghelpers!!! I am trying to make a really cool walking and idle animation with CFrame:lerp.

1 answer

Log in to vote
-1
Answered by 7 years ago

Okay so, i dont got much time, but i know the struggle. So basicly lerp is used like so

for i = 0,1,0.1 do
wait()
Part.CFrame = Part.CFrame:lerp(cframe.New(0,0,0),i)
end

Now you can do the same with welds and such, but its not efficient for the player themselves. If you use weapons like for say, phantom forces it would be efficient to use lerp to move the arms from position to position, keeping in mind they are welded, not using motor6's.

Now honestly for any player oriented animations your better off using the animation editor.

0
You don't want to use lerp the part position directly, because that would be constantly changing. Instead you would want to set the Start Position to a variable before the loop. OldPalHappy 1477 — 7y
0
Whats the difference, it works, i did this for all my framework scripts, theirs nothing wrong with this. Abstract_Life 65 — 7y
0
I disagree. The link I posted in the comments of this question explains why. OldPalHappy 1477 — 7y
Ad

Answer this question