How do I fix these errors? (561504)

I have a script that’s supposed to align the player with the camera whenever you move. here’s my script.

//Return direction align with Camera
Vector3 targetDirection
{
get
{
Vector3; cameraForward = mainCamera.TransformDirection(Vector3.forward);
cameraForward.y = 0; //set to 0 because of camera rotation on the X axis

//get the right-facing direction of the camera
Vector3; cameraRight = mainCamera.TransformDirection(Vector3.right);

//determine the direction the player will face based on input and the camera's right and forward directions
return Input.GetAxis("Horizontal") * cameraRight + Input.GetAxis("Vertical") * cameraForward;
}
}

//This method needs to run on Update
void RotateWhileMoving()
{
if(speed > 0.5f)
{
//normalize the direction the player should face
Vector3; lookDirection = targetDirection.normalized;

//rotate the player to face the correct direction ONLY if there is any player input
if (lookDirection != Vector3.zero)
{
newRotation = Quaternion.LookRotation(lookDirection);

transform.rotation = Quaternion.Slerp(transform.rotation, newRotation, 4.5f * Time.deltaTime);
}
}
}

But I keep getting these errors


How do I fix these?

You keep writing “Vector3;” instead of “Vector3”. Semicolons can only be used at the end of statements.

–Eric

but before i got an error saying i needed to add them saying “expecting semicolon at end (2,8)”

If you’re doing javascript I believe what you want is var varName : Vector3