Please use code tags .
But the answer is that your have used the GetComponentsInParent (plural) which returns an array instead of a single component which is what your turretAI field is. You should have used GetComponentInParent.
Please use code tags .
But the answer is that your have used the GetComponentsInParent (plural) which returns an array instead of a single component which is what your turretAI field is. You should have used GetComponentInParent.