Make Player follow his legs

So i want my player to follow his legs (lol) with this code:

public class LookAtMouse : MonoBehaviour {

	public GameObject LegsPosition;
	

	void Update () {
		

		//movement
		transform.position = LegsPosition.transform.position;
		}
}

But the player does not follow the legs position :confused: I get no errors or nothing.

Any ideas?

THank you!

Nevermind i figured it out. :slight_smile: