Need a Resistor?

Hello. This question is not related to the Arduino but I don't know who to ask. I was told I need to use a resistor in this drawing. (Let me know if it makes since).

I need to keep this relay open for a few mili seconds longer after power is cut off. Using just the capacitor and diode works but the photo eye blinks a few times after the capacitor discharges. I think it's over amp the photo eye?

From what I've read I need to know the "RC" but having a hard time understanding it. In the drawing I have a resistor drawn in. Would anyone know what resistor is needed? Thanks!

Your drawing is not very informative. What are components 3 and 4? Push buttons?

What is that supposed to do after all? Is this your own design or found from somewheree?

CHeers,
Kari

Components 3 and 4 are 10 TO 30 VDC prox sensors.
https://www.bannerengineering.com/in/en/products/sensors/photoelectric-sensors/s18-series.html?sort=4#all

Here is what the whole cartoon drawing looks like. I think I need a 50 ohm resistor from what I've read. I added it to the drawing. Does it look correct? Still learning and thank you for replying!