Help on a simple gun camera movement system

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    Ans: I want to make a make a system similar to that of the game silent assassin link:Silent Assassin - Roblox, most Importantly not the shooting machnike but the way the camera moves on the x axis not y when the weapon is equiped.
  2. Wht is the issue? Include screenshots / videos if possible!
    Ans: To be frank I don’t know how I would tackle this problem.
  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    Ans: I tried to do something with CFrame.LookAt but it stuck in one direction.
local LocalPlayer = game.Players.LocalPlayer

local Character = LocalPlayer.Character or LocalPlayer.CharacterAdded:Wait()

local Gun = script.Parent
local Camera = workspace.CurrentCamera
local Mouse = LocalPlayer:GetMouse()

local IsEquiped = false

	IsEquiped = true
	while IsEquiped do
	Character.PrimaryPart.CFrame = 	CFrame.lookAt(Character.PrimaryPart.Position,,0,Mouse.X))

	IsEquiped = false