Can I please have help making my camera follow the player in the X direction aswell as Y & Z without rotation

Im not very good at scripting to start off so pls be kind
The script I currently have allows for Z direction movement and has perfect camera position from player and facing direction. The only Issue is that when I move forward or backward it doesnt move at all, however follows the player when the player moves left or right. I want to make the camera move forward if the player does so too while keeping everything else working the same if possible, pls help me!
Here is my Camera script:

local runservice = game:GetService("RunService")
local Players = game:GetService("Players")
local player = Players.LocalPlayer

local camera = workspace.Camera


local HEIGHT_OFFSET = 8
local CAMERA_DEPTH = 60

local function Camera()
	local character = player.Character
	if character then
		local humanoidRootPart = character:WaitForChild("HumanoidRootPart")
		local RootPosition = humanoidRootPart.Position + Vector3.new(0, HEIGHT_OFFSET, 0)
		local cameraPosition = Vector3.new(-CAMERA_DEPTH ,RootPosition.Y, RootPosition.Z)
		camera.CFrame = CFrame.lookAt(cameraPosition, RootPosition)
	end
end

runservice:BindToRenderStep("SidescrollingCamera", Enum.RenderPriority.Camera.Value + 1, Camera)

I’m not entirely sure… but I think you would have to add an attachment to the head with a part and assign the camera to that part using

workplace.Camera.CameraSubject = "your part"

and then just position the part in the same spot you had the camera before.