void Update()
{
if(Input.GetButtonDown("Fire1"))
{
Ray ray = new Ray(transform.position, Vector3.forward);
if(Physics.Raycast(ray, out RaycastHit hit)
{
Destroy(hit.collider.gameObject);
}
}