GML Physics for a scarf that follows the player


Hello, I'm new on programming games, so as you can guess a barely know how to do code what I want.

I searched for tutorials of how to code the physic that is mentioned on the title but couldn't find anything.

What I'm aiming for is a scarf that is attached to the player and moves with him with real scarf physics (like in Dead Cells).

So, want somebody help me with this, please, I'll appreciate that a lot.