local animation = Instance.new("Animation")
animation.AnimationId = "https://web.roblox.com/catalog/4760001635"
-- Local variables
local animTrack = nil
local canPlay = true
function playShockAnim(Source)
if canPlay then
canPlay = false
animTrack = script.Parent.Humanoid:LoadAnimation(animation) -- Load animation into Humanoid
canPlay = true
animTrack:Play() -- Start the animation
end
end
https://gyazo.com/87e99c72daa2891625a0653ad0b2c918 (this is the link to what happens)
how do I play my animation?

3 comments
Where are you calling the function playShockAnim?
what does Source means in function?
what should i use instead then?