Error: LoadAnimation requires the Humanoid object (jamespringles.Humanoid) to be a descendant of the game object
From my research people are saying how the character isnt loaded yet or the humanoid isnt loaded or its still referring to the old humanoid. Here's what I've tried and it still gives me the error
local gripAnimation = character.PlayerAnimations.PistolGrip
local gripTrack = humanoid:LoadAnimation(gripAnimation)
local function onCharacterAdded(new)
character = new
humanoid = character:WaitForChild("Humanoid")
local gripAnimation2 = character.PlayerAnimations.PistolGrip
local gripTrack2 = humanoid:LoadAnimation(gripAnimation2)
gripTrack = gripTrack2
end
player.CharacterAdded:Connect(onCharacterAdded)
I then read that this animation method is deprecated, but I don't understand how the new animation API works and how I can animate it on a local script.
https://developer.roblox.com/en-us/api-reference/class/Animator I've tried using the new Animation API, but it can only be used on severscripts and if I fire something from the client to the server I can't access the same animation to :Stop() it I also can't send the Animation object from the client to the server because every time i send it, it just shows up as nil.

2 comments
and then, you have to play the animation by doing humanoid:WaitForChild("Animator"):LoadAnimation(animation):Play()
it can still be used in local script, i tried with a sword.