First, understand that it is important to be as flexible in your hamstrings as possible. The less restriction you have the better. A great place to start is the Banded Hamstring Stretch. Next you will need the strength to start to actively pike your body. The V-Up and its progressions are a good place to spend some time.
Once you find yourself comfortable with these movements, you can start working on the Toe to Bar by working on the Hanging Knee to Elbow. This will begin the process of strengthening your lats. In the video notice how Jim is pushing into the bar with straight arms, raising his hips and knees. It is the combination of strong lats, abs, and hip flexors along with flexible hamstrings that will allow you to work towards strong, controlled Toes to Bar.
This movement will take time to learn. Focus on your weaknesses and work hard.