Well, it was slow so I put the speed to be faster and now it's fine
Now the main little problem is that there is a dead zone. The dead zone has to be different according to the distance of the light from the camera, but I think that the camera will be in the worst case 2 meters from the light, so the dead zone is pretty fine (I tested it from a distance of about 3.5 meters and it worked fine). So do you think it is necessary to make the dead zone dynamic?
Oh, and I realized there is no reason for the wait time, it works fine without it.
BTW, you're really helping

Thanks a lot! Added to you reputation.