How can I make a tail physics system?

I am currently working on a dinosaur survival game called Clash Of Eras, a tail physics system would make the game look so much better if I could add one, but I currently have near no idea how.

I want to make a tail physics system that will turn the creature’s tail when the player turns, here is an example: https://gyazo.com/6aa8dad53b1d8247fb23808f93dc7154.mp4

I have no idea where to start on this, I know how to detect when the player is turning, and I have tried using an animation that turns the tail when the player does, but it ends up looking stiff and weird.

I have looked on the developer hub and asked my friends who also script for help on this, but nothing I’ve found or tried has helped me.

Use this idea coupled with some hinge constraints between the tail pieces and you should be able to get the tail to turn as shown in the video. Use actuator type servo and play with the max angle of the servo according to the turn.

I want the tail to also be able to be animated, I need to know what CFrame to apply to the motor6ds in the tail and how to find this CFrame value.