Variable not giving the right output?

So, first off I am going to preface this, but there’s no need to do this on Tick.

You can make this an event based system.

Regardless, what’s probably happening, is that bool “Attacking” is being reset to False.

Instead of doing your crazy tick damage thing and overlap setting your health. Use EventAnyDamage for your Character first off.

https://docs.unrealengine.com/latest/INT/Engine/Blueprints/UserGuide/Events/

And then use ApplyDamage to actually apply the damage On Overlap. Apply Damage | Unreal Engine Documentation

Watch this tutorial, should help you understand better:

Hi,

I am new to using the unreal engine and the blueprints and I am trying to create a melee attack system, but the when I cast to the sword’s blueprint it says that the damage variable as 0 when it should be set to 50.

I have set the damage variable in the sword’s blueprint.

Thank you for you time!

Thanks so mush for this it worked really well!