I know clearly how to open a door with a UI button, with a click detector i can use the TweenService to create a similar animation, But something that always got me wonder is how can i know on wich side is the player?, Like on this GIF, this script know on wich side the door got to open. I am kinda dull with all stuff that use CFrame, ive took some time to read the wiki again and again. Can someone help me with this subject? i dont want to remake the same door, i only need a "exemple" netheir a script already maked, only something to get me on the road of that subject.
local PlayerMagnitude = (Part.Position - Player.Character.HumanoidRootPart.Position).magnitude

5 comments
You could check whether the X, Y, or Z values of one of the player's body part's position is greater or lower than the X, Y, or Z value of the door's main part. You would have to change this value for every door though.
Alternatively, you could have two door handles on both sides of the door, and clicking one will open it one way, and clicking the other will open the door the other way.
And how do i know if they are inferior or superior?
Why would you need to know that?
Because I need to know everything