Guard cells regulate the opening and closing of the stomata and this regulation is brought about by the movement of water in and out of the guard cells. Potassium ions play a role in the opening and closing of stomata by changing the concentration of ions in the guard cells. When the potassium ions are inside the guard cells, water also flows into the guard cells because of osmosis causes them to swell which results in the opening of stomata. When the potassium ions are out of the guard cells, water also flows out of the guard cells because of osmosis and the stomata close