Anim notify state can't cast to blueprint

Hello, I’ve been trying to make a basic hit detection system using blueprints but I’m having an issue where I can’t see my line trace for the animation notify state I added. I followed many tutorials on how to create basic melee combat systems and when I connect an “event begin play” event to my “set timer by event node” I can see the line trace, but it doesn’t follow the animation notify I added and displays the line trace at all times when holding the bat

I’ll post images below of my blueprints to show what I’m trying to do.

Weapon BP where the line trace is

Graph Notify Begin:

Graph Notify End

Animation Montage with the Notify State:

The code that plays the montage I made: (I don’t think the issue is here since the montage plays as intended)

My only idea on why this may not be working is in the tutorials I watched, All the code is done in the character bp where mine is in the weapon bp, but that’s because it’s an inventory item that I want specific for the bat rather than the character, but the character is actually being referenced in the animation montage. I’m new to UE so please let me know if any more information is needed, or if I’m not explaining my problem enough. But all help would be greatly appreciated!

This is also the tutorial I tried to follow. Everything worked perfectly up until 10:03 where he started making the notify state event. https://youtu.be/iPfU1SmzkkY?si=7uB9rx1aQeFIX2UZ

did you try to set soem breakpoints or add print string in code to see where does it actually stop working?

Yes, in the Anim Notify State (2nd and 3rd images) the print string stops showing up if I add it after the “cast to bp_baseballbatV1”. This is the case for both the notify begin and the notify end.

It seems like the issue might be that the cast to the bp_baseballbatv1 is failing in the anim notify state. I’m not sure how to fix this tho.

can you put print string to cast failed if it triggers then we know

Yes I have print strings to cast fail and a successful cast and only the cast fail string is showing. Do you know how could I cast this successfully without it failing?

You should print string the name of the owner of your notify. Looks like you’re casting to the bat but the animation is on the character.
Make sure the owner is what you think it is.