The sampling time of the ray sensor is updated

Hello, everyone How can I change the sampling time of the ray sensor at run time when I can’t change the sampling time the first time after I have judged it at run time