Error: " 09:22:22.639 - ServerScriptService.Script:5: attempt to index nil with 'LoadAnimation'"
local uip = game:GetService("UserInputService")
local char = script.Parent
local human = char:WaitForChild("Humanoid", 1)
local anim = char:WaitForChild("Lookatwrist", 1)
local animtrack = human:LoadAnimation(anim)
uip.InputBegan:Connect(function(input)
if input.KeyCode == Enum.KeyCode.E then
animtrack:Play()
print("played")
end
end)
i am trying to make it play a animation when you press e but it wont work please help

2 comments
nope just makes a inf yield
If that's the case, then there is no child named Humanoid in char. Unfortunately, you're not providing enough information for a meaningful solution. Make sure char is a character as you expect, and that there's a humanoid in that character named Humanoid. Where is your script located?