How to make a Teleport System Tutorial

Hi there! My name is Anthony, today I’m going to show you how to make a simple teleportation system. Don’t worry it’s pretty basic :slight_smile:

So first we add two parts:

These two parts will be our pads.

Then rename the first part to “Telepad”

Then rename the second part to “Telepad2”

IMPORTANT: Make both Telepads anchored and can collide is equal to false.

Why did we need to rename them? So it can be easier to get later in the script. I’ll describe each line, don’t worry.

Now add a script in both Telepads.

After that, open the script you put in “Telepad”.

Delete the "print(“Hello World”) and follow me

–Variables

local Telepad = script.Parent --This line is for telling the server, what Telepads we are using!

local Destination = workspace.Telepad2 --Now we set up our destination, which is Telepad2

local debounce = true – So that every time we just teleported, we won’t teleport again.

local delay = 3 --This is our simple delay time

local DestinationPos = Destination.Position

–Function

Telepad.Touched:Connect(function(player) --We create our function

if debounce then

local char = player.Character –We get the player’s Character

local hrp = char.HumanoidRootPart –Then the HumanoidRootPart

debounce = false –We set our debounce to false

hrp.Position = DestinationPos –Then we get our player and teleport him to Telepad2!

wait(delay) –wait so it doesn’t crash

debounce = true –Set it back to true

end

end)

Yay!! We are almost done!! :slight_smile: Just copy the script and put it in Telepad2’s script.

IMPORTANT:

Change the “local Destination = workspace.Telepad2” to local Destination = workspace.Telepad

Change the “local Telepad = script.Parent” to local Telepad2 = script.Parent

Change the “Telepad.Touched:Connect(function(player)” to Telepad.Touched:Connect(function(player)

And… you have finished!!! :DDD Test it out!

Have a good day/night

8 Likes

This is good but, maybe use ``` next time. Cause it looks a bit messy.

1 Like

Indeed, I just found out about it today, because I just ranked up today! Thanks for the feedback

1 Like
–Variables

local Telepad = script.Parent --This line is for telling the server, what Telepads we are using!

local Destination = workspace.Telepad2 --Now we set up our destination, which is Telepad2

local debounce = true – So that every time we just teleported, we won’t teleport again.

local delay = 3 --This is our simple delay time

local DestinationPos = Destination.Position

–Function

Telepad.Touched:Connect(function(player) --We create our function

if debounce then

local char = player.Character –We get the player’s Character

local hrp = char.HumanoidRootPart –Then the HumanoidRootPart

debounce = false –We set our debounce to false

hrp.Position = DestinationPos –Then we get our player and teleport him to Telepad2!

wait(delay) –wait so it doesn’t crash

debounce = true –Set it back to true

end

end)