So, I was fooling around and I used UserInputService or whatever it is, to try and activate an animation. I don't know why. But I fooled around until I stopped getting errors, but no product was produced, here's the code, can anybody tell me why.
local UserInputService = game:GetService("UserInputService")
local player = game.Player.LocalPlayer
repeat wait() until player.Character.Humanoid
local humanoid = game.player.Character.Humanoid
Animation = Instance.new("Animation")
Animation.AnimationId = "rbxassetid://4475040216"
local playAnim = humanoid:LoadAnimation(Animation)
local e = Enum.KeyCode.E
local function IsheEKeyDown() return UserInputService:IsKeyDown(e) end
local function Input(input, gameProcessedEvent) if IsheEKeyDown() then playAnim:Play() end end