how to control SMOOTHNESS via GUI slider?! It's not working...pls help!

hello world

I’ve been trying to use a GUI slider to control ‘smoothness’ of an object but It just doesn’t work.

here’s my latest atempt:

using UnityEngine;
using UnityEngine.UI;  
using System.Collections;

public class metalicslider : MonoBehaviour {
public GameObject metasphere; // object that will be affected
public Slider sldfind;
 Renderer sphrend;



	// Use this for initialization
	void Start () {
		sphrend = metasphere.GetComponent<Renderer>();
		sphrend.material.shader = Shader.Find ("Standard");

		
			}




	// Update is called once per frame
	void Update (){
		sphrend.material.EnableKeyword ("_SPECCGLOSSMAP");
		sphrend.material.SetFloat ("_SPECCGLOSSMAP", sldfind.value);

	}
}

I checked the documentation, tried this one too, but no cookie

using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour {
    public Renderer rend;
    void Start() {
        rend = GetComponent<Renderer>();
        rend.material.shader = Shader.Find("Specular");
    }
    void Update() {
        float shininess = Mathf.PingPong(Time.time, 1.0F);
        rend.material.SetFloat("_Shininess", shininess);
    }
}

please, help me!

@kbr0n Hello there.

OK, here is the way to do that:


So, as you can see that’s how could be done, I recommend to you to download the shaders accordingly to your unity version to check the properties you can controlling it by script, cheers.