You say that line 20 in the second script has the problem. So, it's possible that `am` is null, meaning the `FindGameObjectWithTag()` fails to find a GO. (You don't check this in your code.) Alternatively, you call a `GetBlue()` function. Which is programmed to return `null`. You then call a `PickRandomType()` function on this `null` value. So this line is pretty much designed to cause a problem.
↧