In the present work, a simple analytical approach is presented in order to clarify the physics behind the edge current density behavior of a hot plasma entering in contact with a resistive conductor. As has been observed in recent simulations [C. R. Sovinec and K. J. Bunkers, Plasma Phys. Controlled Fusion 61(2), 024003 (2019)], when a plasma comes in contact with a highly resistive wall, large current densities appear at the edge of the plasma. The model shows that this edge current originates from the plasma response, which attempts to conserve the poloidal magnetic flux (Ψ) when the outer current is being lost. The loss of outer current is caused by the high resistance of the outer current path compared with the plasma core resistance. The resistance of the outer path may be given by plasma contact with a very resistive structure or by a sudden decrease in the outer plasma temperature (e.g., due to a partial thermal quench or due to a cold front penetration caused by massive gas injection). For general plasma geometries and current density profiles, the model shows that, given a small change in minor radius (δa), the plasma current is conserved to first order [ δ I p = 0 + O ( δ a 2 ) ]. This conservation comes from the fact that total inductance remains constant ( δ L = 0 ) due to an exact compensation of the change in external inductance with the change in internal inductance ( δ L ext + δ L int = 0 ). As the total current is conserved and the plasma volume is reduced, the edge safety factor drops according to q a ∝ a 2 / I p . Finally, the consistency of the resulting analytical predictions is checked with the help of free-boundary MHD simulations.