i am working onn a script to make a platform that vanishes and then comes back but i would like it to turn red when i touch it so you know it will vanish. can someone show me how to edit the color. i looked at the scripting reference and it kept giving me errors when i tried using that code.
this is my code
var obj : Transform;
function OnCollisionEnter () {
var obj = Instantiate(obj, transform.position, Quaternion.identity);
Destroy (gameObject ,1);
}