I don't know too much about animations sooo idk what I did wrong
game.Players.PlayerAdded:Connect(function(plr)
local UIS = game:GetService("UserInputService")
UIS.InputBegan:Connect(function(key)
if key.KeyCode == Enum.KeyCode.F then
local animation = Instance.new("Animation")
animation.AnimationId = "3560009028"
local animTrack = nil
local canPlay = true
function playShockAnim()
if canPlay then
local player = plr
canPlay = false
animTrack = player.Humanoid:LoadAnimation(animation)
canPlay = true
animTrack:Play()
end
end
playShockAnim(plr)
end
end)
end)

2 comments
idk man
What's the error message?