This error is from the Door script I’m trying to get working on
so here’s the code also I’m new at Unity
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Door_script : MonoBehaviour
{
GameObject player;
private Animator _Animator; // Use this for initialization
void Start ()
{
_Animator = GetComponent <Animator >(); //put Animator in angle brackets
}
void OnCollisionEnter(Collision col, ref bool character_nerby)
{
if(col.gameObject == player)
{
_Animator.SetBool("character_nerby", true);
}
}
void OnCollisionExit(Collision col, ref bool character_nerby)
{
if(col.gameObject == player)
{
_Animator.SetBool("character_nerby", false);
}
}
}