- Home /
How do i fix "Script does not exist" error when trying to add my script to something
Hello everyone as you may already know why you are here about my question, i am having an error saying something like "cant add script to component"item name" because this script does not exist, please make sure title and script are matching" or something along those lines i have tried everything and looked everywhere for the answer so i thought i might ask on the questions page. Thank you for anyone who can help me and you will be credited in the game i am making if you pm me your name/company. Thank you for taking the time to read this and hopefully help me out
Answer by Josh Naylor · Sep 19, 2014 at 02:19 PM
Try make a copy away from Unity of your script, delete the script in Unity and re-import and try add it to your component.
Answer by dmg0600 · Sep 19, 2014 at 03:07 PM
The file and class names must be the same for Unity to recognize the script. Check that the file in project screen and the class name inside the script are exactly the same, even lower and upper case letters.
Answer by RebelDragon · Mar 10, 2015 at 03:45 PM
Do you have any complier errors on your script? If so, Unity probably won't let you attach it to anything. This happens to me all the time.
Your answer
![](https://koobas.hobune.stream/wayback/20220613163328im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
Can I use Javascript (Unityscript) for Box2D for Unity or Farseer Physics? 1 Answer
C# Gravity Gun. Error CS0120 2 Answers
Converting C#? 1 Answer