Advertisement
Newwy

Untitled

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