How to get specific Time triggred Events

I have road spikes where if my player overlaps them, he takes 10% health. I want it so for every half second he continues to linger on those spikes, he takes damage. Delays don’t work because they Guarantee that the player will take damage. The end result should be that the player can stand on the spikes for .4 seconds then quickly get off and not take damage. I really need help

Make a float variable, name it ‘DamageTimer’. On overlap, check to see if Game Time is greater than DamageTimer. If so, do damage and set DamageTimer to ‘Game Time + .4’.