I’m trying to lerp this stand model in front of me so that it can punch, but when I try that while it’s being welding to the character’s torso, it starts getting buggy movements. I removed the weld right before it lerps to the position. I don’t know a good solution of how to lerp a model while being welded. Any solutions that I could do?
wait(.5)
local prevWeld = Stand:WaitForChild("HumanoidRootPart"):WaitForChild("Stand Weld")
prevWeld:Destroy()
for i=0,1,0.1 do
wait()
Stand:WaitForChild("HumanoidRootPart").CFrame = Stand:WaitForChild("HumanoidRootPart").CFrame:lerp(HumanoidRP.CFrame * CFrame.new(2,1,3), 0.5)
end
Is it intensional that you are using 0.5 in the percentage spot instead of the “i” from your for loop? This means that it will not move smoothly, but will remain perfectly between your start and end point for the entirety of the for loop.
To create the Tween-like effect using Lerping, you just have to plug the for loop value into the :Lerp().
for i=0,1,0.1 do
wait()
Stand:WaitForChild("HumanoidRootPart").CFrame = Stand:WaitForChild("HumanoidRootPart").CFrame:lerp(HumanoidRP.CFrame * CFrame.new(2,1,3), i)
end