Advertisement
Guest User

Для анимации

a guest
Mar 2nd, 2019
7,935
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. local Player = game.Players.LocalPlayer
  2. local Character = Player.Character or script.Parent
  3. local Humanoid = Character.Humanoid
  4. local UserInputService = game:GetService("UserInputService")
  5.  
  6. local AnimationId = "rbxassetid://507772104"
  7.  
  8. local Debounce = true
  9.  
  10. local Key = "Q"
  11.  
  12. UserInputService.InputBegan:Connect(function(Input, IsTyping)
  13. if IsTyping then return end
  14. if Input.KeyCode == Enum.KeyCode[Key] and Debounce == true then
  15. Debounce = false
  16. local Animation = Instance.new("Animation")
  17. Animation.AnimationId = AnimationId
  18. local LoadAnimation = Humanoid:LoadAnimation(Animation)
  19. LoadAnimation:Play()
  20. wait(1)
  21. Animation:Destroy()
  22. Debounce = true
  23. end
  24. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement