SHOW:
|
|
- or go back to the newest paste.
1 | -- Import animation | |
2 | local animation = Instance.new("Animation") | |
3 | - | animation.AnimationId = "http://www.roblox.com/Asset?ID=580342958" |
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) |