Help with opening door correctly

Hello, im making a game. i wanted to script a door that would open when you press it and close

I just tween the cframe to the needed cframe

The problem is that it just goes there and goes a little through the door frame too, but i want it to move it to the right position something like this

can anybody help please, thanks

i figured it out i used another part and the door is welded to that part and it now closes and opens correctly