Having porblems with monbehaviour in java script any help please!

Welcome to the forums!

As @Kiwasi said, you’re going to want to move away from UnityScript (aka Javascript, but it isn’t) and use C#. There are converters that can mostly translate your existing code, and it’s not that much more difficult to learn. You can still use tutorials aimed at UnityScript and just swap out the C# equivalent syntax in most cases.

Please view this post on using code tags . You’re not gonna get many people willing to help you if your code isn’t formatted, as it’s a real pain in the ass to read otherwise.

Your wall of text contained one part that I didn’t have to read past: the error message. These are always helpful and will tell you where the problem is. Learn to read them and decipher their meaning. Your says “Can’t add script behaviour TMP_CoroutineTween. The script needs to be derived from MonoBehaviour”. That means that your script named TMP_CoroutineTween doesn’t properly inherit from MonoBehaviour.

Are you using the newest version of Unity? If so, you actually can’t use UnityScript files and are probably working in a C# file. If you’re working in an older version that supports UnityScript still, maybe you created a C# file on accident? Some screenshots of your editor would help determine this.

2 Likes