how to make the main camera follow the player in 2d

my game is 2D.there is a player who contentiously jumps to reach destination(note that he has no running motion just jumping jumping…)
the camera is been followed the player . i tried bellow scenarios.
1.making camera as a child to the player.
2.using smoothFollow Script.
by doing these with the player the camera also jumping(i mean getting up and down). player position to the camera
it’s giving jurking the same player position with Lerp.
it’s giving confusion.

i need the camera to follow the player smoothly . is there any other way or i need do any implementations .

waiting for ur suggestions.

thank you

Never tried the smoothFollow, but can’t you just block the Y axis on the script ?

i never tried to edit the script. wait 'll try that one also