I need help to create a random (or not) teleporting system

The sender teleporter should be set up to work without needing to be entered, and can be placed anywhere.

Would you prefer players to enter a teleporter ?

Or have it work automatically when a player is knocked ?