How to hit a specific object

Hi.

I want the tag to work as the tag.

When I shoot the - only falls the one which i touched.

But the tag objects fall together. When i touch balloon’s karzina, i want the gravityScale to be changed.

Thanks in advance.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class Arrow_1 : MonoBehaviour {

	public float speed;
	public float lifeTime;
	public float distance;
	public int damage;
	public LayerMask whatIsSolid;

	GameObject[] karzina;
	
	
	
	


	void Start () {
		
		Invoke("DestroyArrow_1", lifeTime);	
	}
	
	void Update () {
		Vector2 screenPosition = Camera.main.WorldToScreenPoint(transform.position);
		if (screenPosition.y > Screen.height  || screenPosition.y < 0)
    {
		Destroy(gameObject);
	
    }
		RaycastHit2D hitInfo = Physics2D.Raycast(transform.position, transform.up, distance, whatIsSolid);
		if (hitInfo.collider != null) {
			if (hitInfo.collider.CompareTag("Balloon")) {
				hitInfo.collider.GetComponent<Balloon>().TakeDamage(damage);
			}
	
		
		Destroy(gameObject);
			karzina=GameObject.FindGameObjectsWithTag("karzina");

			foreach (GameObject r in karzina){

			r.GetComponent<Rigidbody2D>().gravityScale = 2f; 
				
		}
		
			
		}

		transform.Translate(Vector2.up * speed * Time.deltaTime * 1.5f);
	}

	
}

Change your update method to this one

void Update () {
         Vector2 screenPosition = Camera.main.WorldToScreenPoint(transform.position);
         if (screenPosition.y > Screen.height  || screenPosition.y < 0)
     {
         Destroy(gameObject);
     
     }
         RaycastHit2D hitInfo = Physics2D.Raycast(transform.position, transform.up, distance, whatIsSolid);
         if (hitInfo.collider != null) {
             if (hitInfo.collider.CompareTag("Balloon")) {
                 hitInfo.collider.GetComponent<Balloon>().TakeDamage(damage);
                hitInfo.collider.gameObject.transform.GetChild(0).GetComponent<Rigidbody2D>().gravityScale = 2f;
             }
                
         Destroy(gameObject);
                      
         }
 
         transform.Translate(Vector2.up * speed * Time.deltaTime * 1.5f);
     }

void Update () {
Vector2 screenPosition = Camera.main.WorldToScreenPoint(transform.position);
if (screenPosition.y > Screen.height || screenPosition.y < 0)
{
Destroy(gameObject);

      }
          RaycastHit2D hitInfo = Physics2D.Raycast(transform.position, transform.up, distance, whatIsSolid);
          if (hitInfo.collider != null) {
              if (hitInfo.collider.CompareTag("Balloon")) {
                  hitInfo.collider.GetComponent<Balloon>().TakeDamage(damage);
                 hitInfo.collider.gameObject.transform.parent.GetComponent<Rigidbody2D>().gravityScale = 2f;
              }
                 
          Destroy(gameObject);
                       
          }
  
          transform.Translate(Vector2.up * speed * Time.deltaTime * 1.5f);
      }