Advertisement
Yondiux

Animacion de correr

Apr 6th, 2021
14,064
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. -- para que salga la animacion debes pulsar shift para correr
  2. local UIS = game:GetService('UserInputService')
  3. local Player = game.Players.LocalPlayer
  4. local Character = Player.Character
  5.  
  6. UIS.InputBegan:connect(function(input)
  7. if input.KeyCode == Enum.KeyCode.LeftShift then
  8. Character.Humanoid.WalkSpeed = 20 -- es la velocidad al correr
  9. local Anim = Instance.new('Animation')
  10. Anim.AnimationId = 'rbxassetid://(borras este parentesis y pones el ID de tu animacion)'
  11. PlayAnim = Character.Humanoid:LoadAnimation(Anim)
  12. PlayAnim:Play()
  13. end
  14. end)
  15.  
  16. UIS.InputEnded:connect(function(input)
  17. if input.KeyCode == Enum.KeyCode.LeftShift then
  18. Character.Humanoid.WalkSpeed = 16 -- es la velocidad al caminar
  19. PlayAnim:Stop()
  20. end
  21. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement