CHoff719

DARK SOULS

Jun 4th, 2019
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. local Players = game:GetService("Players")
  2. local Player = Players.LocalPlayer
  3. repeat wait(); until Player.Character
  4. local Character = Player.Character
  5. local Torso = Character:WaitForChild("Torso")
  6.  
  7. local Target
  8. local i= 0
  9.  
  10. game:GetService("UserInputService").InputBegan:connect(function(v,b)
  11. if Enum.UserInputType.MouseButton1 == v.UserInputType then
  12. if i + 1 >= Players.NumPlayers then
  13. i = 0
  14. end
  15. i = i + 1
  16. local Victim = Players:GetPlayers()[i]
  17. print(Victim.Name)
  18. if Victim and Victim ~= Player and Victim.Character and Victim.Character:FindFirstChild("Torso") then
  19. Target = Victim.Character:FindFirstChild("Torso")
  20. end
  21. end
  22. end)
  23.  
  24.  
  25. game:GetService("RunService").RenderStepped:connect(function()
  26. if Target then
  27. --print("works")
  28. local NewPosition = Vector3.new(Target.CFrame.p.x, Torso.Position.y, Target.CFrame.p.z)
  29. Torso.CFrame = CFrame.new(Torso.CFrame.p, NewPosition)
  30. end
  31. end)
Add Comment
Please, Sign In to add comment