Help with script!!!

Hello Someone suggested me a script I finally found out how to use the scipt :slight_smile: but then I got an error… Heres the full error.
Assets/Scripts/PlayerController.cs(11,25): error CS1525 Unexpected symbol ‘(’
Also here the script

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

public class PlayerController : MonoBehaviour {

    private Vector3 direction = Vector3.left;

    private void Update()
    {
        if ( /* touch */ )
            direction = -direction;
    }
}

Also I was told to add an if statement and parenthesis by some other people but I didn’t know where to write it. Sorry for the

You must have a boolean return in If statement, so comment is invalid.
Just declare a bool for example : isTouched and add it between parenthesis and error is gone.

 using System.Collections;
 using System.Collections.Generic;
 using UnityEngine;
 
 public class PlayerController : MonoBehaviour {
 
     private Vector3 direction = Vector3.left;
     private bool isTouched;
 
     private void Update()
     {
         if ( isTouched )
             direction = -direction;
     }
 }

Thanks for the help!! :slight_smile: