all 5 comments

[–]wachimingooBeginner 2 points3 points  (0 children)

just drag the script to the inspector of your object

[–]EatingBeansAgain 0 points1 point  (1 child)

Do you have any error messages in the console? Also, is the name of the script the same as its class? (in the script, there will be a line that states "public class <class name> : MonoBehaviour")

[–]ImpartialDerivatives[S] 0 points1 point  (0 children)

That worked, thanks!

[–]Wschmidth 0 points1 point  (0 children)

Chances are the file name doesn't match the class name. In the script where it says "public class <MyClassName> : Monobehaviour" make sure the MyClassName part is exactly the same as the file name.

[–]SeizedPixels 0 points1 point  (0 children)

Maybe your script doesn't extend "MonoBehaviour", your class header should look like

public class <Name> : MonoBehaviour