when i drag the ball script to the inspector i get this, Can't add script component "ball" because the script class cannot be found. Make sure there are no compile errors and that the file name and cass name match. i checked everything and my script looks like yours.