Variable not accesible

In my program, a variable isn’t available from a void.

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

    public class GameManager : MonoBehaviour {


    [Space]
    [Header("Tiles")]
    public GameObject Tiles;
    public GameObject[,] tiles = new GameObject[8,8];

    

    public void Start()
    {
        for (int i = 0; i < 8; i++)
        {
            Transform parent = Tiles.transform.GetChild(i);
            for (int j = 0; j < 8; j++)
            {
                tiles[i, j] = parent.GetChild(j).gameObject;
                tiles[i, j].gameObject.GetComponent<Tile>().PosInput(i, j);
            }
        }
        tiles[3, 0].transform.position = new Vector3(0f, 10f, 0f);    //<-- Here the tiles[3,0] GameObject gets moved to (0f,10f,0f)
    }
    
   //On Mouse Click
    public void Input()
    {
          tiles[3, 0].transform.position = new Vector3(1f, 10f, 0f); //<-- But here it doesn't. It says the there's no GameObject in tiles[3,0]
    }

}

I tried adding a bool then in the Start() Method changing it to true, and then in the Input() I checked it if it was true and it wasn’t.

The problem is that the Input function isn’t called when the mouse is clicked.

Use Update method instead:

    public void Update()
    {
        if (Input.GetMouseButtonDown(0))
            tiles[3, 0].transform.position = new Vector3(1f, 10f, 0f);
    }

I’ve created a new problem but with everything in it please check that out: @belwar