Hasli4

RBLX. TeleportScript

Dec 25th, 2025
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.53 KB | None | 0 0
  1. -- Скрипт телепортации модели персонажа к детали Part2
  2. -- при касании детали Part1
  3.  
  4. local StartPoint = script.Parent.Part1
  5. local EndPoint = script.Parent.Part2
  6.  
  7. function Teleport_onTouch(touched)
  8.         print(touched, touched.Parent)
  9.         if touched.Parent:FindFirstChild("Humanoid") then
  10.                 local human = touched.Parent
  11.                 human:MoveTo(EndPoint.Position + Vector3.new(0, 10, 0))
  12.         end
  13. end
  14.  
  15. StartPoint.Touched:Connect(Teleport_onTouch)
Advertisement
Add Comment
Please, Sign In to add comment