its been days since i tried to make my ads alone, but i cant and i found out a video talking about CFrame:Lerp, i tried to use it on my own script but doesnt work:
this is the idle version, everything normal. the cube at the left of the gun is the Sight, the goal
and then, instantly after i press the key to aim, it will reach the goal WITHOUT doing it “smoothly”
this is the code btw, if you have questions i will answer the faster i can.
RunService.RenderStepped:Connect(function(Delta)
ViewModel:SetPrimaryPartCFrame(camera.CFrame * AimCFrame)
if isAiming then
local offset = ViewModel.Sight.CFrame:ToObjectSpace(ViewModel.CameraPart.CFrame)
AimCFrame = offset:Lerp(offset, 0.1)
print("lerp") --it prints, but alot in a fraction of second
else
local offset = CFrame.new()
AimCFrame = offset:Lerp(offset, 0.1)
end
--i tried adding a task.wait(0.1) but it doesnt affect the code
end)

