Perlin Noise Scripting Example

I was trying to use the example script from the Unity Scripting Guide here: Unity - Scripting API: Mathf.PerlinNoise

No matter what I seem to attach the script to, it gives me the error saying no renderer object is present:

“MissingComponentException: There is no ‘Renderer’ attached to the “Light1” game object, but a script is trying to access it.
You probably need to add a Renderer to the game object “Light1”. Or your script needs to check if the component is attached before using it.”

What am I doing wrong?

Thanks…

At a guess I’d say you have put this script onto a light called “Light1”, and “Light1” has no renderer attached.
The script has the line renderer.material.mainTexture = noiseTex, so there needs to be a renderer for it do do that