Your comments

Alright, I fixed it. I started working on this project when I was still a beginner in programming (still am), so I made a struct called Animation at one point. I thought I deleted it but it turns out it's still conflicting with the component, so I replaced "Animation", with "UnityEngine.Animation", and it works fine.