Enemy Color Change Help!

Hi! I am making a game but i have a problem… How can i for example if i have one cube that collides with the other cube (the enemy), how can i make the enemy turn color to red for a second then it turns back to its original color (white)? Paste the code in the comments and THANK YOU!

We don’t write code for you here and posts that ask for complete scripts are generally rejected.

To change color you need to set the renderer.material,color field
see: Unity - Scripting API: Material.color

For a delayed effect you can use the Invoke method with a time delay.

Try to write your script yourself and, if you cannot get it to work, post what you tried here along with an expaination of what went wrong and the complete text of any unity errors.