Advertisement
OpenBionicAdmin

Teleport Script

Dec 13th, 2017
407
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.83 KB | None | 0 0
  1. -->Note:Change the stuff inside of the quotation marks to the block name you want to teleport to
  2. -->OpenBionicAdmin
  3. -->12/13/2017
  4. local Teleport = "Remove and put block/part name here" --Put the name of the Part between the ""s.
  5. function Touch(hit) --Indicates that the Part has been Touched.
  6.     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.
  7.     local Pos = script.Parent.Parent:findFirstChild(Teleport) --Gets the Part to teleport to.
  8.         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.
  9. script.Parent.Touched:connect(Touch) --Listens out for Touchers.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement