local humanoid = character:WaitForChild("Humanoid")
if humanoid then
local bobOffset = CFrame.new()
if humanoid.MoveDirection.Magnitude > 0 then
if humanoid.WalkSpeed == 13 then
bobOffset = bobOffset:Lerp(CFrame.new(math.cos(tick()* 4) * 0.05, -humanoid.CameraOffset.Y/3, 0) * CFrame.Angles(0, math.sin(tick() * -4) * -0.05, math.cos(tick() * -4) * 0.05))
isSprinting = false
elseif humanoid.WalkSpeed == 18 then
bobOffset = bobOffset:Lerp(CFrame.new(math.cos(tick()* 8) * 0.1, -humanoid.CameraOffset.Y/3, 0) * framework.module.sprintCF)
isSprinting = true
end
else
bobOffset = bobOffset:Lerp(CFrame.new(0, -humanoid.CameraOffset.Y/3, 0), 0.1)
isSprinting = false
end
end
(this is in RenderStepped)
For some reason when lerping the viewmodel position, it does not constantly update with the camera position and stays in place, only to snap back into camera view when Im not moving.
Notepad++ tells me what your parathesis are including
You’re doing :Lerp(CFrame.new( stuff here ) * CFrame.Angles( stuff here ))
Which will result in just passing a single CFrame and no number value (percent value).