Custom event not working outside of blueprint

your problem is likely GetActorOfClass you have no idea what that is returning but otherwise what error/problem are you having exactly?

generally speaking make sure you check all your references are valid.