not all code paths return a value [C#]

So, I get this error and I don’t get what its trying to say at. Can someone help me? Its saying the error is in the code line with the private vector3 RoatateWithView.

using UnityEngine;
using System.Collections;

public class Player_Controll : MonoBehaviour
{
private CharacterController controller;

public float jumpForce;
public float moveForce;

private Vector3 Move_Vector { set; get; }
private Vector3 LastMove;
private float gravity = 14f;
private float verticalvelocity;

private Transform CamTrans;

private void Start()
{
    controller = GetComponent<CharacterController>();
}

private void Update()
{
    CharacterControll();

    Move_Vector = RotateWithView();
}

private void CharacterControll()
{
    if (controller.isGrounded)
    {
        verticalvelocity = -1;

        if (Input.GetKeyDown(KeyCode.Space))
        {
            verticalvelocity = jumpForce;
        }
    }
    else
    {
        verticalvelocity -= gravity * Time.deltaTime;
        
    }

    Vector3 MoveVector = Vector3.zero;
    MoveVector.x = Input.GetAxis("Horizontal") * moveForce;
    MoveVector.y = verticalvelocity;
    MoveVector.z = Input.GetAxis("Vertical") * moveForce;
    controller.Move(MoveVector * Time.deltaTime);
}

private Vector3 RotateWithView()
{
    if (CamTrans != null)
    {
        Vector3 dir = CamTrans.TransformDirection(Move_Vector);

        return dir;
    }
    else
    {
        CamTrans = GetComponent<Camera3D>().Cam_Transform;
    }
}

}
@Mavina

Can you help again?

It’s because the else block does not return anything. Try this

private Vector3 RotateWithView()
 {
     if (CamTrans == null)
         CamTrans = GetComponent<Camera3D>.Cam_Transform;

         return CamTrans.TransformDirection(Move_Vector);
 }