Can't add script component because the script class cannot be found. Make sure that there are

im new to unity and i have almost no idea what this error is can someone help me (this has happened with every script ive tried to put in a thing)

All the parts of that error message that you cut off are what you need to do.

  1. Make sure there are no compile errors. This means look at the Console window in Unity and address any and all red compile errors. Unity cannot proceed until these are addressed
  2. Make sure the script class name matches the filename. E.g. public class Apple needs to be in a file called “Apple.cs”