Building a teleport in Roblox can be fairly tricky, and it's not something that's easy to explain in a quick answer.
If you're just after the effect, a simpler route is to grab a ready-made teleport from the free models section and drop it into your game.