How to create an AFK detection for doing a function?

hello there everyone
so after finishing the applying damage lecture you asked us to test new things and methods of damage beside the falling damage and projectile damage, so I had that one idea of “if you go afk, you will get damaged too” XD
i know it is a bit too advanced for me to apply this step in unreal blueprint specially am 5 lectures away from finishing the section but anyway i cant finish the section without applying this step, cuz i want to
so now the thing is i tried to method i had in mind and tested it it worked and diddnt at the same time both results are shown and cant understand why it doesnot work as i wanted so plz can you help me guys fixing it?
here is the method i used

I wouldn’t use delays for this type of functionality, especially on tick.

Instead create a float variable, lets call it “AfkCountdown” that gets lowered each tick. Once it reaches zero, then flag the player as being AFK.