I see the problem, KeyDown is deprecated. I advise you to use UserInputService. Here is the script, I will also explain it below.
MAKE SURE THIS IS IN A LOCALSCRIPT!!
repeat wait() until game.Players.LocalPlayer.Character ~= nil
local player = game.Players.LocalPlayer
local char = player.Character
local InputService = game:GetService("UserInputService")
InputService.InputBegan:Connect(function(input)
if input.KeyCode == Enum.KeyCode.Q then
local animation = script.AthleticSplits
local anime = char:WaitForChild("Humanoid"):LoadAnimation(animation)
anime:Play()
end
end)
We will be using a service called, UserInputService. It's much like KeyDown but kinda more advanced. KeyCode just means the key a user/you will press, like Q or E. Now we are defining the animation as the AthleticSplits and defining anime to load that animation. And then we play it!
The repeat wait() until game.Players.LocalPlayer.Character ~= nil just means that the script will wait for the character to load so the script can work properly.
Hope this helped!