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

How do I use CFrame:lerp for animating?

1 answer

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.

3 comments

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.

0

Whats the difference, it works, i did this for all my framework scripts, theirs nothing wrong with this.

0

I disagree. The link I posted in the comments of this question explains why.

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