Advertisement
Guest User

Roblox Teleporter script

a guest
Jan 6th, 2021
11,714
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.12 KB | None | 0 0
  1. --when you are pasting this into your teleporter, copy this whole thing and change the "Teleporter 2" part to "Teleporter 1" when you are putting this into your second teleporter.
  2. --Don't forget to change the "Teleporter 1" to whatever the other teleporter name is. For example, If you named your point B teleporter something like Cheese, then in this script, change "Teleporter 1" to Cheese. Vice versa for the point A teleporter
  3. local Teleport = "Teleporter 1" --Put the name of your second teleporter part between the ""
  4. function Touch(hit) --Indicates that the Part has been Touched.
  5.     if script.Parent.Locked == false and script.Parent.Parent:findFirstChild(Teleport).Locked == false then script.Parent.Locked = true script.Parent.Parent:findFirstChild(Teleport).Locked = true --Checks Debounce.
  6.         local Pos = script.Parent.Parent:findFirstChild(Teleport) --Gets the Part to teleport to.
  7.         hit.Parent:moveTo(Pos.Position) wait(1) script.Parent.Locked = false script.Parent.Parent:findFirstChild(Teleport).Locked = false end end --Takes you there and Ends the Function.
  8. script.Parent.Touched:connect(Touch) --Listens out for Touchers.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement