Trigger Problem (C#)

Hello everyone, seems I’ve got a bit of a problem.

I’m trying to make it so when the player enters a trigger on an enemy, the enemy will look at the player and go towards him, but I keep getting the error

Here’s my code

using UnityEngine;
using System.Collections;

public class AutoAI : MonoBehaviour {
	public float speed = 20;
	public float rotateSpeed = 10;
	
	public float leftRight = 3;
	public float inFront = 7;
	private int direction = 1;
	
	public bool isViewed = false; 
	public float player : tag;
	
	// Use this for initialization
	void Start () {
	
	}
	
	void OnTriggerEnter (Collider collision)
	{
		if (Collision.GameObject.FindGameObjectsWithTag(player))
			{
				isViewed = true;
			}
			
			if (isViewed)
			{
				Transform.LookAt(player);
			}
	}
	
	// Update is called once per frame
	void Update () {
		StartCoroutine(PickDirection());
		
		if (!Physics.Raycast(Transform.position, Transform.forward, inFront))
		{
			transform.Translate(Vector3.forward * speed * Time.deltaTime);
		}
	
	else{
		if (Physics.Raycast(transform.position, -transform.right, leftRight))
		{
			direction = -1;
		}
		else if (Physics.Raycast(transform.position, transform.right, leftRight))
		{
			direction = 1;
		}
		
	}

	
	transform.Rotate(Vector3.up, 90 * rotateSpeed * Time.smoothDeltaTime * direction);	
}
}

Any help is greatly appreciated.
plus on top of that your free to use the code if you need it :wink:

what is wrong on this line :wink:

 public float player : tag;

I haven’t the slightest idea what is wrong with it,
but I did get the feeling something was wrong with it if that counts for anything :slight_smile:

One problem is that C# is case sensitive,

So “Collision.GameObject” should be “collision.gameObject”.
also, the member transform is “transform.LookAt” not “Transform.LookAt”.

Go over all the code and make sure the syntax and capitalizations are correct.