Lerping a motor6d C0 not working, happening instantly

Hey!
Lerping a motor6d C0 is not working, it is happening instantly regardless of the fact that the alpha is 0.

Here is my code.

	tool.BodyAttach.Hammer.C0 = tool.BodyAttach.Hammer.C0:Lerp(tool.BodyAttach.HammerFinal.C0, hammerValue.Value)

This is in renderstepped.

I am trying to make a function that lowers the revolver hammer when holding mouse.

I’ve tried researching and such and nothing is working.

i think you should make it an animation instead

not sure that would work. you have to hold down the mouse to shoot and the hammer has to go down relative to the timer

when animations stop, do they go back to the original position without finishing?

well of course, by using Anim:Stop()

alright i’ll give it a try, thanks! i wont mark it as the solution for now because i’d rather use the first method but if it works i’ll do it.

1 Like

goodluck, also this might help Help lerping the neck motor6d

1 Like

i think it happens instantly because you didnt put the third parameter
im pretty sure its the amount the lerp sets to the result and if its set to 1 then it will basically set to it
and its probably set to 1 by default
not completely sure how it works so read up on it

The CFrame::lerp() method takes two parameters, not including self.

The code has the correct amount of parameters.

Right now you’re lerping from the hammer’s current C0 every frame, which means the start point keeps changing. This would make the interpolation move to the target very fast.
You should be storing a fixed starting CFrame, and always lerp from the start CFrame, instead of the current value of C0.

for example:

local start = tool.BodyAttach.Hammer.C0 -- store outside the frame update
tool.BodyAttach.Hammer.C0 = start:Lerp(tool.BodyAttach.HammerFinal.C0, hammerValue.Value)