Simply apply it directly to the opacity.
when i apply that expression it turns opacity to 100 after that time but after the same amount of time after doesnt turn it back to 0%, i'd like it to alternate between exact values 100 & 0 every half second.
thanks for your help
You can use expressions but for that kind of easy spring, blink and wiggle stuf I'm using free script/plugin called DUIK. It's mostly known from being awesome rigging tool, but it also have several usefull tools among them also blink.
You can find Duik here: https://rainboxprod.coop/en/tools/duik/
My bad... That should have been a modulus operator:
Did any of these answers help you achieve the optimum result?
You also can try
or simply create two Keyframes. One for 0 and one for 100 and use expression loopOut("pingpong");