I can select with the Range Mask tool but when I make an adjustment it does not apply it to the election but the entire image.
Maybe the OP should first tell us which local adjustment tool he is using. Range Mask is not a tool by itself. It is part of the Adjustment Brush, the Graduated Filter and the Radial Filter. So which one are you using and are you sure that you are not moving the sliders from the Basic Panel? That can happen when the sliders of the local adjustment tool are hidden (check the small black triangle).