I followed the teleport service guide on the wiki correctly, but when I touch the teleport, it doesn't do anything.
COMMUNITY QUESTION
How do I make a teleportation script?
1 answer
If you mean stepping on a brick, then teleporting one place to another, then;
local Tele1 = game.Workspace:WaitForChild("Teleporter1") --Waits for Teleporter1 (Switch out with the name of the teleport you want the player to teleport to Teleporter2 when Teleporter1 is touched
local Tele2 = game.Workspace:WaitForChild("Teleporter2") --Waits for Teleporter2 (Switch out with the name of the teleport you want the player to teleport to
local Debounce = false --The debounce for the script
if Tele1 and Tele2 then --If script finds Teleporter1 and Teleporter2 then
Tele1.Touched:connect(function(hit) --Teleporter1 is touched
if hit.Parent:FindFirstChild("Torso") and not Debounce then --If script finds Torso within the Player's Character and Debounce is false then
Debounce = true --Debounce is now true
hit.Parent.Torso.CFrame = CFrame.new(Tele2.Position + Vector3.new(0,3,0)) --Teleports Player to Teleporter2
wait(2) --Waits two before Debounce is false again
Debounce = false --Debounce is false again
end --The end for the 'if' that which checks for Torso and if Debounce is false
end) --The end for the Touched event
end --The end for the first 'if' statement
Hope this helped!
1 comment
0
I think it's to teleport to a different game type of teleport. He brought up TeleportService.
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
Could you provide your script? We can't really figure out your problem without seeing it.