How do i clone an 'enemy' when pressing "F" ??

Hello!

here is my script but it doesnt work:

var Player : Transform;
    var EnemyModel : Transform;

    function Update()
    {
   transform.LookAt(Player);
   transform.Translate(Vector3.forward * 0.1);
     if(Input.GetKeyDown("F"))
     {
           Instantiate(EnemyModel, Player.transform.position, transform.rotation);
      }

    }

i cant figure it out please help! :stuck_out_tongue:
Thanks for your time!

It might be β€˜f’ rather than β€˜F’. (Not sure if it’s case-sensitive - you can check the docs, as it might be specified there.)

Also, in order to make the motion of the object framerate-indepedent, you’ll most likely want to scale the translation by Time.deltaTime.

and if the β€œF” doesnt work,
make a input and script from that