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