Error with bCanBeDamaged

Hi everyone, so I have a simple bomb blueprint script.

Basically, there’s a event hit node wired to a canBeDamaged boolean.

Then, if the boolean is true, then the explode event is called.

It works in the game, but after I close out of the PIE mode, I get an error:

Error Accessed None ‘K2Node_Event_Other’ from node Construction Script in blueprint Blueprint_Bomb

Although the script isn’t in the construction script, but rather in the event graph it is because of this boolean for sure.
Without it, I do not get an error.

What could be the cause of this?

Here’s my code:

Anyone know what the issue is?

Is it maybe because the objects it’s hitting does not have the property of ‘can be damaged’ ?

I figured it out a while ago:

I was checking that if it was valid and if it cab be damaged in one node.
If it was not valid it would still check bCanBeDamaged, resulting in the error.

To fix this just check if it’s valid and then the value of bCanBeDamaged using two separate ‘if’ nodes.