How would I make an elevator TP every players inside it after 5 seconds?

you could use zones to detect when player enter and leave the elevator - ZonePlus v3.2.0 | Construct dynamic zones and effectively determine players and parts within their boundaries
you could add/remove players from an array and after waiting for 5 seconds teleport every player in that array to your real elevator.