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 = this.app.root.findByName("Camera").getLocalRotation();
Network.socket.emit('positionUpdate', {id: Network.id, x: pos.x, y: pos.y, z: pos.z, rx: rot.x, ry: rot.y,rw:rot.w, rz: rot.z, playermodel:this.app.root.findByName("PlayerModel").getPosition(),animstate:CharacterController.animstate});

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

this.players[data.id].entity.setLocalRotation(0,data.ry*-1,0,data.rw);

Im not very sure how this is happening.

And heres the project
https://playcanvas.com/editor/scene/1628849