So, I have a script requiring UserInputService to trigger an animation when the key E is pressed. Although UserInputService is working fine, I checked, it works just fine, the trigger for E is not working correctly. The Output gives me 0 errors which confuses me even more- Here's my code.
local input = game:GetService("UserInputService")
function onInput(process,plrinput)
if not process then --Make sure player isn't typing in chat
if plrinput.KeyCode == Enum.KeyCode.E then --Check key
local animation = Instance.new("Animation")
animation.AnimationId = "http://www.roblox.com/Asset?ID=<insert animation here>"
end
end
end
input.InputBegan:Connect(onInput)
I might be a fool for not knowing how to do this, but uh... Hey, at least I asked.

3 comments
Did you load the animation into the humanoid?
...Uh... Y-YEAH! I DID! Hahahahahaha. Wow, I sure am smart!
m