I am trying to make an aim down the sight code but i keep getting errors?

I don’t see a problem with it, heres my code:

using UnityEngine;
using System.Collections;

public class AimingDownSight : MonoBehaviour {
	private Vector3 newPosition;
	void awake()
	{
		newPosition = transform.position;	
	}
	void Update () 
	{
		positionChanging();
	}

	void positionChanging()
	{
		Vector3 positionA = new Vector3 (0.3946627, -0.1788931, 0.7112392);
		Vector3 positionB = new Vector3(0.009421766, -0.1324487, 0.5510964);
		
		
		if (Input.GetMouseButtonDown(1))
		{
			newPosition = positionB;
			
		}
	
		else
		{
			newPosition = positionA;
		}
	}
}
  1. Awake(), not awake(). C# code is case sensitive.
  2. new Vector3 (0.3946627, -0.1788931, 0.7112392); These numbers are doubles but floats are expected. Add an f to each number, like new Vector3 (0.3946627f, -0.1788931f, 0.7112392f);
  3. transform.position will never change by this script. All you’re doing is writing to newPosition, but nothing reads it. The computation and if statement have no meaningful actions to them. I guess you haven’t completed the script yet, though.
  4. If we missed anything, please copy your error messages here after searching for a solution online.