Advertisement
Newwy

Untitled

Jan 17th, 2018
366
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local animation = Instance.new("Animation")
  2. animation.AnimationId = "http://www.roblox.com/Asset?ID=01336707690"
  3.  
  4. local trackanimation = nil
  5. local playability = true
  6. function playAnimation(AnimationSource)
  7. if playability == true then
  8. local plr = game.Players.LocalPlayer
  9. trackanimation = plr.Character.Humanoid:LoadAnimation(Animation)
  10.  
  11. trackanimation.KeyframeReached.connect(function(kf)
  12. print('Working')
  13. end)
  14. trackanimation.Play()
  15. end
  16. end
  17. script.Parent.Click:connect(PlayAnimation)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement