Transform child out of bounds

I am working on a inventory system and am having a transform child out of bounds error.
my Hierarchy:

   >InventoryCanavas
    ---->Hotbar
    -------->Slot (1)
    -------->Slot (2)
    ---------------->CubeIMG
    ---------------------->Cube
     ------- >Slot (3)
    -------- >Slot (4)
    -------- >Slot (5)
    -------- >Slot (6)
    -------- >Slot (7)
    -------- >Slot (8)
    -------- >Slot (9)
    -------- >Slot (10)
    --END--

so the way it works is index is set by the scroll wheel (I am sure index is correct I have done a lot of testing on it). index then tells this what slot to go to and then takes the child and sends it to my placement script with some data that is found by comparing the child to a list of placeable objects in the game. It the cooses from BLOCK SAW DRILL WELDER. My debug says the error is in the line “placement.objToPlace = hotbar.transform.GetChild(index).GetChild(0).GetChild(0).gameObject;”
the first child of the slot object is to add a graphic to the slot.
the code:

f(hotbar.transform.GetChild(index).transform.childCount == 1)
        {
            placement.objToPlace = hotbar.transform.GetChild(index).GetChild(0).GetChild(0).gameObject;
            for (int i = 0; i < AllObjects.Length; i++)
            {
                if (hotbar.transform.GetChild(index).GetChild(0).gameObject.name == AllObjects*.name)*

{
Debug.Log("This thing that I am holding has the data: " + AllObjects_DATA*);
placement.type = AllObjects_DATA;
_}
}
}*_

So one part of that lookup you are trying to get a child index that is greater than what is there. A few things to try: first making sure the ‘index’ isn’t going to high, even though your slots start at ‘1’ the child will start at 0. You could test this by hard coding a certain index and making sure it actually looks something up. Since you are dealing with an inventory system is it possible that a slot you are looking at is actually empty and therefore has no children?

I know the index value is correct because I color the slot to match the index, and I know my slots start at 1 and getchild starts at 0. and the top if statements checks to make sure there is a child before reading it and sending it to my placement scrip.