Advertisement
Parallaxox

Teleport On Click

Feb 25th, 2025 (edited)
25
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.51 KB | Help | 0 0
  1. --https://www.youtube.com/watch?v=WM6vUCx9aWw
  2. local player = game.Players.LocalPlayer
  3. local mouse = player:GetMouse()
  4.  
  5. mouse.Button1Down:Connect(function()
  6.     local hit = mouse.Hit
  7.     if hit then
  8.         local targetPosition = hit.p
  9.         local character = player.Character
  10.         if character and character:FindFirstChild("HumanoidRootPart") then
  11.             local offset = Vector3.new(0, 5, 0)
  12.             character.HumanoidRootPart.CFrame = CFrame.new(targetPosition + offset)
  13.         end
  14.     end
  15. end)
  16.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement