This does what you want.
I used a $1 script from the store https://www.tgcstore.net/product/24301 because I am still trying/struggling to learn Lua as well.
Good thing about this script is that once you have it you can see how it works and adapt it a lot.
If you transport the player a distance away make sure you set it to always active or you don't arrive at your destination, just stay in a black limbo lol.
description in store:
"Inspired by Resident Evil. Instead of opening a door, the player walks up to the door and presses the "E" key. A fade transition occurs and the player is transported to the other side of the door (See Video). This script also works with a door that requires a key"
its like deja-vu, but all over again, again