Why isn't the variable being set during gameplay? (behavior tree and casting)

Does the blueprint type I’m casting to have to be of type ‘pawn’ it cannot be anything other than type pawn?

Yes I already said the task is running at the very start of the thread though, so how do I fix the invalid pawn? the code in this task should work though I’m assuming, it might be something to do with the way my tree is set up.