I was following along a tutorial on Youtube but it was written in JS but i translated it to C# but i get that error. Here is my code:
headBobStepCounter += Vector3.Distance(parentLastPos, transform.parent.position) * headBobSpeed;
transform.localPosition.x = Mathf.Sin(headBobStepCounter) * headBobAmountX;
transform.localPosition.y = (Mathf.Cos(headBobStepCounter * 2) * headBobAmountY) + (transform.parent.localScale.y * eyeHeightRatio) - (transform.parent.localScale.y / 2);