so I'm in a bit of a pickle it dont work and idk why
in a client script in StarterPlayerScripts
local character = player.Character or player.CharacterAdded:Wait()
local hum = character:WaitForChild("Humanoid")
local animator = hum:WaitForChild("Animator")
local UIS = game:GetService("UserInputService")
local animtrack = animator:LoadAnimation(script.Animation)
UIS.InputBegan:Connect(function(input, gameProcessed)
if gameProcessed then return end
if input.KeyCode == Enum.KeyCode.F then
print("F pressed")
animtrack:Play()
end
end)```