Can't add keyframes properly I am very inexperienced so if the solution is simple no hate please. I am trying to add more keyframes but it says: F-Curve with path= 'location'(2) cannot be keyframed. Ensure it is not locked or sampled. Also, try removing F-Modifiers.

I have no idea what this means. Can someone please explain it to me? I'd greatly appreciate it thank you for your time.
In the Animation layout there is a "Dope Sheet" and summary. I resolved this problem by unchecking the lock icon.



This was my error:


  RuntimeError: Error: F-Curve with path 'scale[2]' cannot be keyframed, ensure that it is not locked or sampled, and try removing F-Modifiers


After turning the lock icon off it works!