Advertisement
Pancakess

anim

Apr 13th, 2019
180
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- Import animation
  2. local animation = Instance.new("Animation")
  3. animation.AnimationId = "http://www.roblox.com/Asset?ID=3069713559"
  4. -- Local variables
  5. local animTrack = nil
  6. local canPlay = true
  7.  
  8. function playShockAnim(Source)
  9.     if canPlay then
  10.         local player = script.Parent.Parent
  11.         canPlay = false
  12.         animTrack = player.Humanoid:LoadAnimation(animation) -- Load animation into Humanoid
  13.         canPlay = true
  14.         animTrack:Play() -- Start the animation
  15.     end
  16. end
  17.  
  18. playShockAnim(script.Parent.Parent)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement