When I assigned a global vector3 array to vertices, I get a null reference exception. Not sure why, as the arrays are both the same size, etc.
NullReferenceException: Object reference not set to an instance of an object
var msh:Mesh=clay.GetComponent.().mesh;
var vertices:Vector3[]=msh.vertices;
for(var p:int=0;p<vertices.Length;p++){
vertices[p]=saveOn[p];
}
*Fixed by declaring SaveOn:Vector3[], and then defining an explicit length.