oopsrainbow4

Touch Teleport

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