Unable to move object using slider

public void MovePointer(float silderValue)
{
float xPos = transform.position.x + silderValue;
print(silderValue);
transform.position = new Vector3(transform.position.x + silderValue, transform.position.y, transform.position.z);
}

It printed the silderValue but it didnt change the x position of the object. I tried to type transform.position + 1, it still doesnt work. The slider value is between 0 to 1 but it should be fine

I also tried this code right here:
public float sliderValue;

    public void MovePointer(float value)
    {
        sliderValue = value;
    }

    private void Update()
    {
        print(sliderValue);
        transform.position = new Vector3(transform.position.x + sliderValue, transform.position.y, transform.position.z);
    }

Still didnt work. Had me struggling for hours. Help would be appreciated.

public float sliderValue = 0f;

    public void MovePointer(float value)
    {
        sliderValue = value;
        print("Function " + sliderValue);
    }

    private void Update()
    {
        print("Update " + sliderValue);
        transform.localPosition = new Vector3(transform.localPosition.x + sliderValue, transform.localPosition.y, transform.localPosition.z);
    }

Tried to debug it and turns out when i move the slider it keeps keeping function 0 to 1 which is normal but in update its still printing 0 all the time? which means that the slidervalue cant change in update? I am confused