Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Import animation
- local animation = Instance.new("Animation")
- animation.AnimationId = "http://www.roblox.com/Asset?ID=580342958"
- -- Local variables
- local animTrack = nil
- local canPlay = true
- function playShockAnim(Source)
- if canPlay then
- local player = script.Parent.Parent
- canPlay = false
- animTrack = player.Humanoid:LoadAnimation(animation) -- Load animation into Humanoid
- canPlay = true
- animTrack:Play() -- Start the animation
- end
- end
- playShockAnim(script.Parent.Parent)
Add Comment
Please, Sign In to add comment