So I have a script that lets me select targets, and following a tutorial, it is supposed to change the color of the target selected. However it is not working and I can not figure out why. What is strange is, I had it correctly working on my old project before starting this one.
private void SelectTarget()
{
selectedTarget.GetComponent().material = Color.red;
}