Advertisement
Laiser

Teleport on Click (q) Roblox Script

Sep 17th, 2017
1,270
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. local player = game.Players.LocalPlayer
  2. local torso = player.Character.Torso
  3. local mouse = player:GetMouse()
  4. local tpEnabled = false
  5.  
  6. mouse.Button1Down:connect(function()
  7. local mT = mouse.Target
  8. if mT.ClassName == "Part" and tpEnabled == true then
  9. torso.CFrame = CFrame.new(mouse.Hit.p)
  10. end
  11. end)
  12.  
  13. mouse.KeyDown:connect(function(key)
  14. if key == "q" then
  15. tpEnabled = not tpEnabled
  16. end
  17. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement