Multiple OnControllerColliderHit If statements for collision

So I’m trying to have a room where my character controller jumps onto platforms around the room to get around and once it has touched the platforms it disappears after 1.5 seconds I’ve been trying different methods for months and nothing has seemed to work

    public BoxCollider boxCollider1;
    public MeshRenderer meshRenderer1;

    public BoxCollider boxCollider2;
    public MeshRenderer meshRenderer2;


    void OnControllerColliderHit(ControllerColliderHit other)
    {
        if (other.gameObject.name == "Platform1")
        {
            boxCollider1.enabled = false;
            meshRenderer1.enabled = false;
        } else if (other.gameObject.name == "Platform2")
        {
            boxCollider2.enabled = false;
            meshRenderer2.enabled = false;
        }

    }

I also have 16 different platforms but I’m testing 2 at the moment. If anyone knows an easy fix or better method please let me know thanks!

public GameObject first;
public GameObject second;

     private void OnCollisionEnter(Collision other)
     {
         if (other.gameObject.name == "Platform1")
         {
             first.SetActive(False)
         } else if (other.gameObject.name == "Platform2")
         {
             second.SetActive(False)
         }
     }