I just restarted using unity two days ago and I made this. I wasn’t suprised I got an error but then with searching up the error and looking back at my script, nothing seems to be wrong. Here is my Code:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Crouch : MonoBehaviour
{
Animator anim1;
// Start is called before the first frame update
void Start()
{
anim1 = GetComponent();
}
// Update is called once per frame
void Update()
{
if (Input.GetKey(Keycode.Left Ctrl))
{
anim1.SetTrigger(“Crouch”);
}
}
}