Hi! I’m trying to script a door so the player appears to open it, I’ve been able to make the door open and play an animation on the player however I cant seem to figure out how to teleport the player to the correct spot on the correct side of the door so that the animation will line up properly ( I’m trying to teleport them to the part on the side that they’re standing on ) I want this to work from both sides.
I currently have two parts in a folder placed in the door model that are in the correct spots on both sides, so if the player was standing on one of them when the animation played, it would look correct. I’ve tried making a script to find the nearest one to the player using magnitude but can’t get that working ( it’s also currently very messy because I was messing with it and didn’t really know what I was doing, so i won’t be including that unless someone asks ) I know how to teleport the player and how to get a part’s CFrame, I just dont know how to get it from the correct part.
Here is an image of the parts placements for anyone that may be confused, I'm trying to line it up so the player is touching the door handle:
Any help is appreciated, thank you for reading!