When it comes to animation, there are a few things you must know.
You must OWN the animation. This means you have exported it.
Make sure the animation's PRIORITY is set to ACTION this will guarantee it to overlap Roblox's Default animations with some exceptions.
Make sure you actually have the animation as an object.
Make sure when you do :LoadAnimation()
it's being done on a Humanoid
Alright now that you know this and confirmed it here is your fixed script:
01 | local plr = game.Players.LocalPlayer |
02 | local chr = plr.Character or plr.CharacterAdded:Wait() |
03 | local hum = chr:FindFirstChild( "Humanoid" ) |
04 | local UIS = game:GetService( 'UserInputService' ) |
06 | UIS.InputBegan:Connect( function (input, IsTyping) |
07 | if IsTyping then return end |
09 | if input.KeyCode = = Enum.KeyCode.E and chr then |
10 | local emote = Instance.new( 'Animation' ) |
12 | local LoadAnimation = hum:LoadAnimation(emote) |
This should work if you happen to find a bug or error comment below. Anyway, I hope I helped.
Here is some information on Animations:
http://wiki.roblox.com/index.php?title=Animations
Best of luck to you and hope it's fixed!