i want to make my gun aim smoothly using lerps but it just doesnt work:
before aiming:
.
after aiming:
.
and (for technical reasons i cant record a video) it will continue to fall off the map
runService.RenderStepped:Connect(function(delta)
--Shooting
if inputService:IsMouseButtonPressed(Enum.UserInputType.MouseButton1) and tool.Parent == char then
shoot()
end
--ADS
if inputService:IsMouseButtonPressed(Enum.UserInputType.MouseButton2) then
--AIMING / THIS IS THE PROBLEM
viewmodel.AimPart.CFrame = viewmodel.AimPart.CFrame:Lerp(camera.CFrame,0.6)
else
--NOT AIMING
viewmodel:PivotTo(camera.CFrame)
end
end)