Get certain vertices?

I can get a mesh’s vertices with mesh.vertices

But how can i access just certain vertices? like the top vertices.

You really just need an algorithm for grabbing whatever verts you want. Here’s an example:

var verts : Vector3[] = mesh.vertices;
//grab all the mesh's vertices

for (var i : int = 0; i < verts.Length; i++) {
    if(verts*.y > someValue) {*

//mesh vertices are in local space.
//edit the vertex info. You could get a simultaneous array of vertex colors or uvs for example
verts += Vector3.up * Mathf.Sin(Time.time);
}
}
mesh.vertices = verts;