Advertisement
hjkook

player controls

Jan 29th, 2019
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. local Player = game.Players.LocalPlayer
  2. local Mouse = Player:GetMouse()
  3. Mouse.Button1Down:connect(function()
  4. if Mouse.Target ~= nil and Mouse.Target.Parent.Name ~= "Workspace" and Mouse.Target.Parent:FindFirstChildOfClass("Humanoid") ~= nil then
  5.  
  6. local Char = Mouse.Target.Parent
  7. Player.Character = Mouse.Target.Parent
  8. workspace.CurrentCamera.CameraSubject = Char
  9. Char.Animate.Disabled = true
  10. wait(0.1)
  11. Char.Animate.Disabled = false
  12. end
  13. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement