Hello I was making my script and I had to make a variable for humanoid. This is my script
local humanoid = game.Players.LocalPlayer.Character.Humanoid
I get errors like this
Players.applebugr21.Backpack.L.1Sword.AnimationLocalScript:2: attempt to index field 'Character' (a nil value)
when I run the scrip. What is wrong with is code? Help me

1 comment
depending on where this is placed , the player's Character may or may not exist when that is ran