What's wrong with my script?

Hi! I have been trying to make my player character move forwards and backwards, and turn left and right. However nothing I do to my script seems to fix it. Any advice would be appreciated.

Here’s the code.

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

public class Player_Movement : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{

}

// Update is called once per frame
void Update()
{
    transform.Translate(0f, 0f, Input.GetAxis("Vertical")* Time.deltaTime);
    transform.Rotate(Input.GetAxis("Horizontal") * Time.deltaTime, 0f, 0f);
}

}

Hey, verify that your player have a rigidbody and this script should work:

     void Update () {
         if(Input.GetKey(KeyCode.W)) {
             transform.position += Vector3.forward * Time.deltaTime * movementSpeed;
         }
         else if(Input.GetKey(KeyCode.S)) {
             rigidbody.position += Vector3.back * Time.deltaTime * movementSpeed;
         }
         else if(Input.GetKey(KeyCode.A)) {
             rigidbody.position += Vector3.left * Time.deltaTime * movementSpeed;
         }
         else if(Input.GetKey(KeyCode.D)) {
             rigidbody.position += Vector3.right * Time.deltaTime * movementSpeed;
         }
 
         if(Input.GetKey(KeyCode.E)) {
             transform.Rotate(0, Time.deltaTime * clockwise, 0);
         }
         else if(Input.GetKey(KeyCode.Q)) {
             transform.Rotate(0, Time.deltaTime * counterClockwise, 0);
         }
     }

And you can adapt it with your own desires

Thanks, but I can’t get this script to work, either… I also get a ton of errors. However, the strangest one is that it says this doesn’t derive from monobehaviour (when it actually does). Please help?