Casting to character inside animation blueprint constantly fails

I’m trying to cast to a character (an ai) inside of an animation blueprint to get a variable so it can enter a transition. It would never enter it and I wasn’t sure why until I saw that the casting was failing. I’m not sure why, I’m using the same skeleton in both the character and the animation blueprint and I’ve tried every single one of the “try get pawn owner” object kind of things in the casting node.

I deleted everything and started from scratch and for some reason now it works, I’m not sure why it didn’t the first time.