Advertisement
rblxdevofficial

Teleporter!

Jul 16th, 2021
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.61 KB | None | 0 0
  1. local pointA = workspace.PointA
  2. local pointB = workspace.PointB
  3. local debounce = false
  4.  
  5. pointA.Touched:Connect(function(hit)
  6.    
  7.     if hit.Parent:FindFirstChildOfClass("Humanoid") then
  8.        
  9.         if debounce == false then
  10.             debounce = true
  11.             hit.Parent.HumanoidRootPart.Position = pointB.Position
  12.             wait(1)
  13.             debounce = false
  14.         end
  15.        
  16.     end
  17.    
  18. end)
  19.  
  20. pointB.Touched:Connect(function(hit)
  21.  
  22.     if hit.Parent:FindFirstChildOfClass("Humanoid") then
  23.        
  24.         if debounce == false then
  25.             debounce = true
  26.             hit.Parent.HumanoidRootPart.Position = pointA.Position
  27.             wait(1)
  28.             debounce = false
  29.         end
  30.  
  31.     end
  32.  
  33. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement