I am attempting to find the rigidbody2D assigned to the grandparent of the object that the script is assigned to,but Transform.parent.parent is not working to do this,

`transform.parent.parent.gameObject.TryGetComponent(out Rigidbody2D parent);`

this is my code, but it won't get the rigidbody, there is one there because if I set the variable to be public I can assign it in the editor manually, but that won't work in this case for the game, is there any other way to access the grandparent object?