Array doesn't increase or add element

I’m making a racing simulator and I made this script for a replay system. But when i tried it it didn’t add any elements, they just stayed at 3. this is how it looked :
40549-array.jpg

#pragma strict

var recorded_obj : GameObject;//Object to record
var Positions : Vector3[];
var Rotations : Quaternion[];
var replayPosition : int;

function Start () 
{

}

function Update () 
{
AddPos();
AddRot();
if(Input.GetKey("r"))
{
   Replay();
}
else
{
   replayPosition = 0;
}
}

function AddPos()
{
var positionsarr = new Array(recorded_obj.transform.position);
positionsarr.length += 1;    
positionsarr.Add(recorded_obj.transform.position);
Positions = positionsarr;
}

function AddRot()
{
var rotationsarr = new Array(recorded_obj.transform.rotation);
rotationsarr.length += 1;    
rotationsarr.Add(recorded_obj.transform.position);
Rotations = rotationsarr;
}

function Replay()
{
//Position
recorded_obj.transform.position = Positions[replayPosition];
//Rotation
recorded_obj.transform.rotation = Rotations[replayPosition];

replayPosition += 1;
}

What’s wrong? I’ve read the Add() description in the scripting API, and it says that it adds a for example value to the end of the Array.

Use a List

 #pragma strict
 
 import System.Collections.Generic; //Access Lists
 
 var recorded_obj : GameObject;//Object to record
 public var positionsarr : List.<Vector3>; //Make List of type
 public var rotationsarr : List.<Quaternion>; //Make List of type
 var Positions : List.<Vector3>;
 var Rotations : List.<Quaternion>;
 var replayPosition : int;

 function Update () 
 {
	 AddPos();
	 AddRot();
	 if(Input.GetKey("r"))
	 {
		Replay();
	 }
	 else
	 {
		replayPosition = 0;
	 }
 }
 
 function AddPos()
 {  
	 positionsarr.Add(recorded_obj.transform.position);
	 Positions = positionsarr;
 }
 
 function AddRot()
 {   
	 rotationsarr.Add(recorded_obj.transform.rotation);
	 Rotations = rotationsarr;
 }
 
 function Replay()
 {
	 recorded_obj.transform.position = Positions[replayPosition];
	 recorded_obj.transform.rotation = Rotations[replayPosition];
	 replayPosition += 1;
 }

Note : If you experience a slowdown with this script, its because the editor is trying to update everything to the inspector. Hide the values from inspector or simply close the List fields by clicking the triangles.