Advertisement
RoScripter

Teleport Pad Script

Mar 14th, 2020
45,791
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.53 KB | None | 0 0
  1. local Pad2 = game.Workspace.Pad1
  2.  
  3. script.Parent.Touched:Connect(function(touchPart)
  4.     if touchPart and touchPart.Parent and touchPart.Parent.Humanoid and touchPart.Parent.currentlyTeleporting.Value == false then
  5.         local Character = touchPart.Parent
  6.         local teleportLocation = CFrame.new(Pad2.CFrame.X, Pad2.CFrame.Y + 5, Pad2.CFrame.Z)
  7.         Character:SetPrimaryPartCFrame(teleportLocation)
  8.  
  9.         local teleportingValue = Character.currentlyTeleporting
  10.         teleportingValue.Value = true
  11.         wait(3)
  12.         teleportingValue.Value = false
  13.     end
  14. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement