I am trying to make a movement script for my main camera but it isnt working!

if(Input.GetButton(“Left”))
{
transform.eulerAngles.y ± -turnSpeed * Time.deltaTime;
}
if(Input.GetButton(“Right”))
{
transform.eulerAngles.y ± turnSpeed * Time.deltaTime;
}

var MoveDirection : Vector3 = Vector3.zero;
var PlayerSpeed : float = 3 ;

MoveDirection = Vector3(Input.GetAxisRaw("Horizontal"), 0, Input.GetAxisRaw("Vertical") );
MoveDirection = (transform.TransformDirection ( MoveDirection )*PlayerSpeed)*Time.deltaTime;
		
transform.position += MoveDirection ;

With the above, you will be able to move around in whichever direction you specify .
Obviously, you need to change values for left,right

Have you drag the script to your camera?