Advertisement
TheUnknownDiscord

teleporter

Sep 3rd, 2021 (edited)
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.10 KB | None | 0 0
  1. part1 = Instance.new("Part", owner.Character)
  2. part2 = Instance.new("Part", owner.Character)
  3. part2.CFrame = CFrame.new(0,1,50)
  4. part1.CFrame = CFrame.new(0,1,0)
  5.  
  6. here = false
  7. function thinghere(part)
  8. here = true
  9. if part.Name ~= "Base" then
  10. wait(1.5)
  11. if here then
  12. part.CFrame = part2.CFrame * CFrame.new(0,1,0)
  13. end
  14. end
  15. end
  16.  
  17. function thinghere2(part)
  18. here = false
  19. end
  20. part1.Touched:Connect(thinghere)
  21.  
  22. part1.TouchEnded:Connect(thinghere2)
  23.  
  24. here2 = false
  25. function thinghere3(part)
  26. here2 = true
  27. if part.Name ~= "Base" then
  28. wait(1.5)
  29. if here2 then
  30. part.CFrame = part1.CFrame * CFrame.new(0,1,0)
  31. end
  32. end
  33. end
  34.  
  35. function thinghere4(part)
  36. here2 = false
  37. end
  38.  
  39. part2.Touched:Connect(thinghere3)
  40. part2.TouchEnded:Connect(thinghere4)
  41.  
  42. part1.Anchored = true
  43. part2.Anchored = true
  44. while true do
  45. part1.CFrame = part1.CFrame * CFrame.Angles(0,0.2,0)
  46. part2.CFrame = part2.CFrame * CFrame.Angles(0,0.2,0)
  47. wait(0.00001)
  48. end
  49. part1.BottomSurface = Enum.SurfaceType.Smooth
  50. part1.TopSurface = Enum.SurfaceType.Smooth
  51. part2.BottomSurface = Enum.SurfaceType.Smooth
  52. part2.TopSurface = Enum.SurfaceType.Smooth
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement