Controlling waterlevels in room after mousedown on different object

Hi there, ive only been scripting for 2 weeks now but im running into a problem i cannot fix. Ive got this room with water on the floor and a hatch under the waterlevel. in order to open the hatch, the player needs to look for a solution to drop the waterlevel. This is done by pushing the correct code on a device. Now i figured out how to make the device… and at the moment were the water needs to drop i can play a sound. But how can i get the waterlevel to drop?

I guess i would need to make unity use the waterplane (tags???) and make this transform OR destory the waterplane itself…
I know how to destoy objects or player itself on collision. But this new problem is kind of a remote situation… How do i tell unity wich object to transform or destroy from within my device-script? (after button is pressed)

Any help would be great,
Still studying on all the rest of my problems, but this one is giving me a headache
Kind regards Tommy

A simple way is to keep a waterLevel float variable that holds the desired water level (waterplane Y coordinate) and make the waterplane follow it at some specific speed. When you want to lower the water level, just subtract the desired height from the waterLevel variable and the water plane will gradually go down to reach the specified level (waterplane script):

var speed: float = 0.5; // speed in meters per second
var waterLevel: float;

function Start(){
  waterLevel = transform.position.y; // waterLevel starts at the current level
}

function Update(){
  // follow waterLevel at desired speed:  
  var pos = transform.position;
  pos.y = Mathf.MoveTowards(pos.y, waterLevel, speed * Time.deltaTime);
  transform.position = pos.y;
}

// to lower 1.5m, for instance, just subtract 1.5 from waterLevel:
  waterLevel -= 1.5;

Ok, THANKS i read through this script and This is even better then what i had in mind (i was only thinking about an abrupt way of tranform, but your script gives me a smooth transaction). Only thing that im not sure about is were to attach this script…
Do i place it on the waterplane itself and call it as a function from within the devices script - after correct code? (If so do i need to set the variables to static?) OR do i place this script inside my devices script - after correct code and use a tag to show the script that it needs to move a specific tagged waterplane? sorry for my noobish questions, im only at this for 2 weeks. (BIG BLUSH)

Little problem : i tried the script out, but unity gives me an error. "Assets/Scripting/Waterplane.js(14,28): BCE0022: Cannot convert ‘float’ to ‘UnityEngine.Vector3’ " — it refers to line 14 transform.position = pos.y; — Any idea ?