Character rotates left and right instead of going forward.

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

public class TankControls : MonoBehaviour
public GameObject Player;
public bool isMoving;
public float horizontal;
public float vertical;

// Update is called once per frame
void Update()
    if (Input.GetButton("Horizontal") || Input.GetButton("Vertical")) {

   // Player.GetCompent<Animator>().Play("Walk");
    isMoving = true;
    horizontal = UnityEngine.Input.GetAxisRaw("Horizontal") *  Time.deltaTime * 150.0f;
    vertical =  UnityEngine.Input.GetAxisRaw("Vertical") * Time.deltaTime * 3.9f;

     Player.transform.Rotate(0, horizontal, 0);
      Player.transform.Rotate(0, 0, -vertical);
    //Vector3 direction = new Vector3(horizontal, 0.0f, vertical).normalized;
    Vector3 movement = transform.right * horizontal + transform.forward * vertical;
    else {
        isMoving = false;
         //database = GameObject.FindWithTag("Player").GetComponent<Animator>().Play("idle");


It’s really difficult to read your code and understand what’s going on. But it looks like you’re using the same buttons to move your player forward and make them rotate. Try using separate buttons for each and see what happens.