How to make aiming less snappy

I am making an fps but my aim is super snappy and I can’t figure out how to tween a moving object to another moving object.

RunService.RenderStepped:Connect(function(step)
	local shirt = game.Players.LocalPlayer.Character:FindFirstChild("Shirt")
	if shirt then
		script.Parent["Left Arm"].Decal.Texture = shirt.ShirtTemplate
		script.Parent["Right Arm"].Decal.Texture = shirt.ShirtTemplate
	end
	script.Parent:WaitForChild("AmmoShow").SurfaceGui.Frame.Ammo.Text = script.Parent.Server.Ammo.Value
	script.Parent:WaitForChild("AmmoShow").SurfaceGui.AlwaysOnTop = true
	if aim == false then
		local camframe = game:GetService("Workspace").CurrentCamera.CFrame 
		script.Parent.FakeCamera.CFrame = camframe + camframe.LookVector * -0 + camframe.UpVector * -0 + camframe.RightVector * -0
		local rotation = workspace.CurrentCamera.CFrame:toObjectSpace(lastCameraCF) 
		local x,y,z = rotation:ToOrientation() 
		swayOffset = swayOffset:Lerp(CFrame.Angles(math.sin(x)*mult,math.sin(y)*mult,0), 0.1)  
		script.Parent.FakeCamera.CFrame = script.Parent.FakeCamera.CFrame * swayOffset 
		lastCameraCF = workspace.CurrentCamera.CFrame
	else
		local camframe = game:GetService("Workspace").CurrentCamera.CFrame 
		script.Parent.Aim.CFrame = camframe + camframe.UpVector * -0.03
		local rotation = workspace.CurrentCamera.CFrame:toObjectSpace(lastCameraCF) 
		local x,y,z = rotation:ToOrientation() 
		swayOffset = swayOffset:Lerp(CFrame.Angles(math.sin(x)*mult,math.sin(y)*mult,0), 0.1)  
		script.Parent.Aim.CFrame = script.Parent.Aim.CFrame * swayOffset 
		lastCameraCF = workspace.CurrentCamera.CFrame
	end
end)

Note : this is written on phone so expect miss spelling.

Change this

script.Parent.FakeCamera.CFrame = camframe + camframe.LookVector * -0 + camframe.UpVector * -0 + camframe.RightVector * -0

To this

game:GetService("TweenService"):Create(script.Parent.FakeCamera , TweenInfo.new(.1) , {CFrame = camframe + camframe.LookVector * -0 + camframe.UpVector * -0 + camframe.RightVector * -0}):Play()

and this

script.Parent.Aim.CFrame = camframe + camframe.UpVector * -0.03

To this

game:GetService("TweenService"):Create(script.Parent.Aim , TweenInfo.new(.1) , {CFrame = camframe + camframe.UpVector * -0.03}):Play()

that makes the viewmodel detached from the camera

1 Like