i really need help with this problem. did i missing something in this code

because i want to display an object when i catch it from falling or i mean the object will be set to true…sorry for my english i really appreciate your help,can anyone help me with this problem because i dont know what is missing this code… i just want to display an object when catch? i hope someone might help me with this…thank you

using UnityEngine;
using System.Collections;

public class setActive : MonoBehaviour
{
   public GameObject objct;

    void Start() {
        //objct.gameObject.SetActive(false);
   }



   void OnTriggerEnter2D(Collider2D col)
   {
       if (col.gameObject.CompareTag("Player"))
       {
           objct.GetComponent<Renderer>().enabled = !objct.GetComponent<Renderer>().enabled;
            objct.gameObject.SetActive(true);
            
           
            
   }
       

  }

}

Is this attached to the same object you’re trying to disable? “Making a GameObject inactive will disable every component, turning off any attached renderers, colliders, rigidbodies, scripts, etc.”. If not, maybe double check that the player object is both spelled correctly (and tagged), and enabled as a trigger!

Hopefully this helps!