So, basically, I have a ServerScript inside of a part called "Tree". I have this script:
local UIS = game:GetService("UserInputService")
local player = game.Players.PlayerAdded:Wait()
local char = player.Character or player.CharacterAdded:Wait()
local HumRP = char:WaitForChild('HumanoidRootPart')
local mouse = player:GetMouse()
local Tree = workspace.Tree
char.Humanoid:LoadAnimation(script.Parent.ChopAnimation)
UIS.InputBegan:Connect(function(keyCode)
if keyCode.keyCode == Enum.KeyCode.E then
if mouse.Target and mouse.Target.Name == "Tree" then
if (HumRP.Position - Tree.Position).magnitude < 5 then
if player:WaitForChild('PlayerGui'):WaitForChild('BackpackGui').Frame.Handler.Equipped.Value == "[LUMBERJACK] Axe" then
if player:WaitForChild('PlayerGui'):WaitForChild('Job').Value == "Lumberjack" then
print("Player is lumberjack, has mouse on target, pressed E and is in range of 5 studs.")
end
end
end
end
end
end)
However, the output says the following:
LoadAnimation requires the Humanoid object (Sensei_Developer.Humanoid) to be a descendant of the game object
No idea what that is. Did I make a mistake? I dunno. Any help please?

3 comments
Probably
...
I dont think serverscripts are compatible with UserInputService...