object reference not set to an instance...

val refers to to val in the top line and it isnt null the nul occurs in the get component dose the get component have to come from a GameObject?? the "score is spelt correctly and in correct case

   for (var val : Transform in open){      
    print ("a");
        var ratesorce = val.GetComponent ("score");  <------ hear

Ok I couldn’t get this to work but I found a way around it. Thank you for your help :slight_smile: