I am new to this and i dont understand what is wrong with my script. Here is my script:
using UnityEngine;
using System.Collections;
public class NewBehaviourScript1 : MonoBehaviour
{
void Start () {
}
void Update ()
{
if(Input.GetkeyDown (KeyCode.R))
{
gameObject.renderer.material.color = Color.red;
}
if(Input.Get (KeyCode.B))
{
gameObject.renderer.material.color = Color.blue;
}
if(Input.Getkeydown (KeyCode.Y))
{
gameObject.renderer.material.color = Color.yellow;
}
}
}