How to freeze rotation, but stay relative to an object

I have object1(marble) and object2(player)
this script is on the player object

void Update () 
	{
		player.transform.position = new Vector3(marble.transform.position.x, marble.transform.position.y + 0.45f, marble.transform.position.z);

		transform.LookAt(transform.position + marble.rigidbody.velocity);
	}

All works fine, except all I need is that the player object to not rotate along its x and z axis.
How can I stop the player object to stay relative to the marble object, but to lock its x and z axis?
Freezing the x and z rotation on the player Rigidbody has no affect.
Can someone help?

The typical way to solve this kind of problem is to bring the LookAt() point down to the level of the game object:

void Update () {
       player.transform.position = new Vector3(marble.transform.position.x, marble.transform.position.y + 0.45f, marble.transform.position.z);

        Vector3 v3LookPos = transform.position + marble.rigidbody.velocity;
        v3LookPos.y = transform.position.y;
 
       transform.LookAt(v3LookPos);
}