01 | local animation = Instance.new( "Animation" ) |
02 | animation.AnimationId = "https://web.roblox.com/catalog/4760001635" |
03 | -- Local variables |
04 | local animTrack = nil |
05 | local canPlay = true |
06 |
07 | function playShockAnim(Source) |
08 | if canPlay then |
09 | canPlay = false |
10 | animTrack = script.Parent.Humanoid:LoadAnimation(animation) -- Load animation into Humanoid |
11 | canPlay = true |
12 | animTrack:Play() -- Start the animation |
13 | end |
14 | end |
https://gyazo.com/87e99c72daa2891625a0653ad0b2c918 (this is the link to what happens)
how do I play my animation?
Okay, you are not calling your function somewhere, just try to do
1 | playShockAnim() |
And also, you have not welded some bodyparts, so they just falling down.