Unexpected symbol 'Transform'

Hi. I have this problem. It seems to me that this is something of Input.GetAxis. But what?

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

public class PlayerController : MonoBehaviour
{
    public float speed = 5.0f;
    public float turnSpeed;
    public float HorizontalInput;
   
   
    // Start is called before the first frame update
    void Start()
    {
       
    }

    // Update is called once per frame
    void Update()
    {
        HorizontalInput = Input.GetAxis("Horizontal")
       
        //We'll move the vehicle forward
        transform.Translate(Vector3.forward * Time.deltaTime * speed);
        transform.Translate(Vector3.right * Time.deltaTime * turnSpeed * HorizontalInput);
    }
}

you missed the ; at the end of line 21.

2 Likes