Advertisement
HowToRoblox

ClickToMove

Dec 4th, 2020
2,164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.23 KB | None | 0 0
  1. local char = script.Parent
  2. local humanoid = char:WaitForChild("Humanoid")
  3.  
  4.  
  5. local mouse = game.Players.LocalPlayer:GetMouse()
  6.  
  7.  
  8. mouse.Button1Down:Connect(function()
  9.    
  10.     local pos = mouse.Hit.Position
  11.    
  12.     humanoid:MoveTo(pos)
  13. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement