Trouble with lighting

im following this video

and im having problems my code matches the code in the video but when i hit the space bar the white list doesn’t show on the ball/scene

this is the code

using UnityEngine;
using System.Collections;

public class DemoScript : MonoBehaviour {

public Light myLight;

void update () {
if (Input.GetKey (“space”)) {
myLight.enabled = true;
} else {
myLight.enabled = false;
}
}
}

Your method is named “update” rather than “Update”. So, it never fires.

You should prove this to yourself by adding a Debug.Log statement (e.g., Debug.Log(“Updating!”):wink: as the first line of the method. You would expect to see that message filling up your Console at something like sixty times per second. But instead, you never see it at all… thus providing a big clue that you haven’t typed the magic method name correctly.

1 Like

I love you so much xD thank you man it means a lot.