Door rotating in place when i try to open it

so what should i do to close the door exactly? i tried connecting a branch with it and a float