Recently experiments on high critical temperature superconductors has shown that the doping levels and the superconducting gap are usually not uniform properties but strongly dependent on their positions inside a given sample. Local superconducting regions develop at the pseudogap temperature ($T^*$) and upon cooling, grow continuously. As one of the consequences a large diamagnetic signal above the critical temperature ($T_c$) has been measured by different groups. Here we apply a critical-state model for the magnetic response to the local superconducting domains between $T^*$ and $T_c$ and show that the resulting diamagnetic signal is in agreement with the experimental results.