Can't set Health of Bot?

OK so hears the thing I’ve made a gun that shoots ray traces, I’m trying to make the ray trace deal damage to a bot that I created. So hears the problem, I’m able to deal damage to the bot and I know the bot is receiving the damage, but when the bot receives the damage depending on if I plug the health variable into a or b pin of the float subtraction node the bot either dies instantly or in two hits ( no matter what the damage is set to ). Does anyone know whats causing this issue?

One thing for sure, your check for health before death should be <= not >=. How is your fire function working? Is it possible your fire function is firing more than once?

The subtract node is correct, you need to subtract damage from health. But then you should check if the health is less or equals zero, like that:

Oh my God thank you so much I’ve been trying to figure this out for several days now, the funny part is I did that originally but it didn’t work because I didn’t have the first part the way it is now.

Glad to hear that :slight_smile: If it helped, can you please accept the answer? Thanks!