rotate only character not the camera

I am trying to rotate my character with a camera attached to it.
Camera is attached because it follows the character.
I am trying to use the slide to rotate the character
I attached the script to the character but because the camera is child on the character it is rotating the camera too which i don’t want
is there anyway to telling the camera not to see this script?
My script

#pragma strict
var hSliderValue : float = 0.0;
 
function Update() {
    transform.eulerAngles = Vector3(0.0, hSliderValue, 0.0);
}
     
function OnGUI () {
    hSliderValue = GUI.HorizontalSlider (Rect (25, 25, 200, 30), hSliderValue, -90, 90.0);
}

Interpunction is key. But to the problem:
It would be better if the camera was by itself and you just use a script which sets its position so you can see your character.

public void LateUpdate(){
    Camera.main.transform.position = this.transform.position + offset;
}

Offset can be defined by you.

sorry my c# is not good, which part of this script tell the camera to follow the character? and will this make camera move with the character even if it is not the child ?

I have figured it out now, so my problem is solved. Thanks for your advice.