Set rotation is acting strange

When i set the players rotation by looking around the model gets paper thin and becomes 2d. but when look back its back to normal. Im trying to prevent rotation on the x axis and i have a feeling that this has something to do with it.

You should provide more details. How do you rotate the model? And how do you prevent X-axis rotation?

Ok sorry

var pos = this.player.getPosition();
var rot ="Camera").getLocalRotation();
Network.socket.emit('positionUpdate', {id:, x: pos.x, y: pos.y, z: pos.z, rx: rot.x, ry: rot.y,rw:rot.w, rz: rot.z,"PlayerModel").getPosition(),animstate:CharacterController.animstate});

That sends the rotation to the server.
The recieve code is below.


Im not very sure how this is happening.

And heres the project