taking a screenshot but not saving in right folder ( HELP!!! )

Hi I am a starting programmer and will one day be the greatest but for now I need the help of you the common man. I am experimenting in Unity and wanted to try to simulate taking a picture with a camera. Anyway it works except it wont save it in the Assets folder or better yet the folder named Screenshot that I created inside the Assets folder. Instead it saves it in newUnityProject11, outside of and next to the Assets folder, mocking me. Here is my script.

var lookSensitivity 	: float = 5;
var xRotation 			: float;
var yRotation 			: float;
var currentXRotation 	: float;
var currentYRotation 	: float;
var xRotationV 			: float;
var yRotationV 			: float;
var lookSmoothDamp 		: float = 0.1;


/*function OnMouseDown(Mouse1) //this didnt work for me at all but this is in the unity script reference
	{
		Application.CaptureScreenshot("Screenshot.png");
	}
*/

function Update () 
{
	xRotation -= Input.GetAxis ( "Mouse Y" ) * lookSensitivity;
	yRotation += Input.GetAxis ( "Mouse X" ) * lookSensitivity;
	
	xRotation = Mathf.Clamp( xRotation, -90, 90 );
	
	
	currentXRotation = Mathf.SmoothDamp ( currentXRotation, xRotation, xRotationV, lookSmoothDamp );
	currentYRotation = Mathf.SmoothDamp ( currentYRotation, yRotation, yRotationV, lookSmoothDamp );
	
	
	transform.rotation = Quaternion.Euler ( currentXRotation, currentYRotation, 0 );

if (Input.GetKeyDown ("space")) //decided to go with GetKeyDown and it works
	{
		Application.CaptureScreenshot("Screenshot.png"); //am I missing something here?
	}
	
	
}

Also I created 2 other scenes in this project and reUsed the playerMovement.js and mouselook.js scripts for my player(capsule) and main camera(child of the capsule) in that scene but when I hit play and move view starts shaking fast and it causes almost a double image. It works on my first scene but shakes on the other 2 any idea whats causing this? Thanks in advance for any help.

So if you are running in the Editor and that’s all you want then you can just specify:

        Application.CaptureScreenshot("Assets/Screenshots/screenshot.png");

But that won’t work in a build because there isn’t an Assets folder when the app is built. You can use Application.persistentDataPath to get a directory that can be written to.

Your jerkiness is caused by using the same velocity for both SmoothDamp operations - you need two velocities, one for X and another for Y.

And who are you calling common ;D

void OnGUI()
{
if (GUI.Button(new Rect(20, 20, 150, 100), “CaptureScreenshot”))
{
//Address of local folder
Application.CaptureScreenshot(“C:/Users/foldername/Screenshot.png”);
}
}