So for my first person shooter I made it so that the fake arms are suppose to move to a specific point when doing a motion which I set but its not working
Here are the variables I set
local moveOffset = CFrame.new(0.02, -0.014, -0.009)
local lerpTime = .2
The code below is all done in renderstepped (I already did a print to check if moving is true and fakeArms are in the camera which do work as I already set their humanoidrootpart to the camera cframe but its torso is not moving.)
local startCFrame = fakeArms.Torso.CFrame
if moving then
fakeArms.Torso.CFrame:lerp(startCFrame * moveOffset, lerpTime)
else
fakeArms.Torso.CFrame:lerp(startCFrame, lerpTime)
end
That did not work so I thought I'd need to keep adding the lerp time so I did it like this next.
local lerpTime = 0
Again the code below is all done in renderstepped
local startCFrame = fakeArms.Torso.CFrame
if moving then
if lerpTime < 1 then
lerpTime = lerpTime + .2
end
fakeArms.Torso.CFrame:lerp(startCFrame * moveOffset, lerpTime)
else
fakeArms.Torso.CFrame:lerp(startCFrame, lerpTime)
end
If anyone knows the issue thanks for helping me in advance! :) ~KIHeros

3 comments
you are doing it wrong...
May you tell me what I am doing wrong? I am new to lerp sorry :/
@UniversalDreams, you did not need to downvote him. His question is better structured than some of the content I've seen on the site. If you're downvoting him for the fact that he is "using lerp wrong", that is why he is asking the question. How would you feel if you asked a question and I upright downvoted you for getting the script wrong? Think before targeting a user.