I want to make a whale automata using four bar linkage and a cam and follower assembly.

below is my rough sketch of my idea.

I used the mechanical expression simulator to find out the lengths of the linkage that creates the shape that I'm looking for. The idea is that the linkage will connect to the whale and moves it.

The cam and follower joint will move the layers of waves up and down.

I still need to figure out why my joints don't work. It will move up but won't come back down. I tried making a new cam and follower joint, but it didn't work. I looked up some tutorials on Youtube and they all use the same method that I use. I think it might be because I don't have a solid box around the whole structure to whole everything in place?