dubleeyrblxx

Teleport -- Roblox

Jul 4th, 2020 (edited)
224
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.59 KB | None | 0 0
  1. -- Put this in the Part you touch to Teleport
  2.  
  3. local Teleport = "Insert Part Name" --Put the name of the Part you wan to teleport to between the ""s.
  4.  
  5. function Touch(hit)
  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
  7.     local Pos = script.Parent.Parent:findFirstChild(Teleport)
  8.         hit.Parent:moveTo(Pos.Position) wait(1) script.Parent.Locked = false script.Parent.Parent:findFirstChild(Teleport).Locked = false end end
  9. script.Parent.Touched:connect(Touch)
Add Comment
Please, Sign In to add comment