Advertisement
StarzoZero

Test Teleportation

Apr 20th, 2019
281
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. --By zamsongod.
  2. --Unlike Clockwork's teleporter, this one teleports ANYTHING not just people!
  3. --Make sure the Part to teleport to is in the same group as this Part.
  4. --Feel FREE to Copy, Abuse and Covet!
  5. local Teleport = "Model" --Put the name of the Part between the ""s.
  6. function Touch(hit) --Indicates that the Part has been Touched.
  7. 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.
  8. local Pos = script.Parent.Parent:findFirstChild(Teleport) --Gets the Part to teleport to.
  9. 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.
  10. script.Parent.Touched:connect(Touch) --Listens out for Touchers.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement