local player = game.Players.LocalPlayer local animation = script:WaitForChild("Animation") enabled = true function onKeyDown(key) if (key ~= nil) then key = key:lower() if enabled (key == "p") then
enabled = false
local animationTrack = player.Character.Humanoid:LoadAnimation(animation) animationTrack:Play()
wait(2) enabled =true
end end end
So yeah i got a problem i want to press a key p then the animation happends, but what am i doing wrong?