Adjust CineCamera focus settings during runtime?

Im trying to make a autofocusing CineCamera by firing a linetrace forward infront of my CineCamera and adjust the Manual Focus Distance. But everytime i run this, UE4 crashes. Any other way to implement an autofocusing CineCamera that im not aware of?