Smooth changing transparency of particle/additive shader

Im trying to smooth change transparency of an object with particle/additive shader.I`ve wrote a code that works on transform.localScale.

renderer.material.color.a = Vector3.MoveTowards(renderer.material.color.a,max,Time.deltaTime * speed);

Have these three errors:

1.error CS1502: The best overloaded method match for `UnityEngine.Vector3.MoveTowards(UnityEngine.Vector3, UnityEngine.Vector3, float)’ has
some invalid arguments

2.error CS1503: Argument #1' cannot convert float’ expression to type `UnityEngine.Vector3’

3.error CS1612: Cannot modify a value type return value of `UnityEngine.Material.color’. Consider storing the value in a temporary variable

Error 1&2: make sure all of the vars you enter at MoveTowards are floats.

Error 3: you can’t modify a single part of the color, just like you can’t modify a single part of transform.

You need to do something like:

renderer.material.color = new Color(renderer.material.color.r,renderer.material.color.g,renderer.material.color.b,[your alpah changes here]);

So basically, you can’t use Vector3.MoveTowards if you only want to cnage the alpah.

Figured by using Time.deltaTime.

changeColor = renderer.material.GetColor("_TintColor");	
		if(increase == false)
		{
			changeColor.a -= Time.deltaTime*2;
			if(changeColor.a <= 0)
				increase = true;
		}
		if(increase == true)
		{
			changeColor.a += Time.deltaTime*2;
				if(changeColor.a >= 0.5)
				increase = false;
		}
		
							
		renderer.material.SetColor("_TintColor", changeColor);