Object error when casting to enemy character BP

Hi guys probably an obvious mistake with my graph here but I need to cast to my enemy character BP to play some animations and stop movement in a different blueprint. Got a screenshot showing the cast and the error when compiling. If you need more info to help me just ask.
Appreciate any help Thanks.

Uhm where is the Screenshot?

Oh oops just turned off pc to go to sleep appreciate your interest will put the screenshot up when I wake up

Mind if I see the whole code? If I think I see what you are trying to I’ll show you a better solution.

You got the Concept of a Cast wrong, a Cast wont get you something out of thin air.

A Cast simply takes a Object and Cast it to a Specific Type. Like you can have a Variable that Holds a Controller or anything that is a Child of Controller, but your BP only knows its a Controller and not if its a AIController or PlayerController or any other Controller Type. But if you take that Controller refference and Cast it you basicly asking is this Controller Refference a AI Controller. If Cast is a success it is indeed a AI Controller und you can access all public variables and Functions it has.

In your example you probably have already somewhere a Pawn ref earlier in the graph you can get the the Controller from there and put it in the Object Pin of your Cast.

I Highly recommand you to watch this Training Video to get the Basics down Blueprint Communications | Live Training | Unreal Engine - YouTube

Good Luck and have Fun =)

You´re welcome? Even though there is just one Solution for the Cast xD stick in a Target.

Otherwise you just changed how you get your desired Refference. Thats fine too.

Hi guys thanks for the help managed to find another solution to the issue.