On My FPS game I keep getting this: NulllReferenceException: Object reference not set to an instance of an object
NullReferenceException:Object reference not set to an instance of an object MouseLookSCript.Update () (at Assets/Assets/MouseLookScript.js:44)
44 if (transform.parent.GetComponent(PlayerMovementScript).grounded)
45 headbobStepCounter += Vector3.Distance(parentLastPos, transform.parent.position) * headbobSpeed;
46 transform.localPosition.x = Mathf.Sin(headbobStepCounter) * headbobAmountX * currentAimRacio;
47 transform.localPosition.y = (Mathf.Cos(headbobStepCounter * 2) * headbobAmountY * currentAimRacio) + 48(transform.parent.localScale.y * eyeHeightRacio) - (transform.parent.localScale.y / 2);