Have you made sure the component is added to the game object?
Also scripting questions go here: Unity Engine - Unity Discussions
And best to use code tags in future: Using code tags properly
Have you made sure the component is added to the game object?
Also scripting questions go here: Unity Engine - Unity Discussions
And best to use code tags in future: Using code tags properly