Code: Locomotion

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Locomotion : MonoBehaviour {
     // Set the speed of your movement
public float speed = 0.5f;
// Tell Unity which GameObject is going to move
public Camera gameCamera;

// Update is called once per frame
void Update()
{
// Create the forward movement of your GameObject
transform.position += gameCamera.transform.forward * speed * Time.deltaTime;
}
}