Hey, so I am trying ot make a woodcutting script and I have this script but when I try and fix it it comes up with The name “Destory” Does not exist in the current context. Can anyone help me?
Code:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class TreeHealth : MonoBehaviour {
public int health = 100;
private void Update()
{
if (health <= 0)
{
Destory(gameObject);
}
}
}