Advertisement
Guest User

Roblox teleport script

a guest
Feb 5th, 2021
3,044
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. local Teleport = "PARTNAME"
  2. function Touch(hit) --Indicates that the Part has been Touched.
  3. 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
  4. local Pos = script.Parent.Parent:findFirstChild(Teleport) --Gets the Part to teleport to.
  5. hit.Parent:moveTo(Pos.Position) wait(1) script.Parent.Locked = false script.Parent.Parent:findFirstChild(Teleport).Locked = false end end
  6. script.Parent.Touched:connect(Touch)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement