Camera follow trouble with 2d platform prototype

Hi everyone I have been working on a prototype but having trouble getting the camera to follow the character the way the 2d platform game goes, I have a script that makes the character turn on the y axis when it moves to the opposite direction and when I apply the camera smooth or camera smooth follow it just does the same thing when the character turns and make irradic movements. Has anyone found a work around for this it’s driving me nuts spent the whole day trying to figure something out.

Maybe you should share the code with us, than we can better understand the problem!

I bought a piece of code from David Collado Sela I don’t know if he would want me to just show it cause I purchased it