Hi. i’m trying to make an interaction raycast that let’s me interact with door switch. But there is a problem.
When i try to put a game object in my lightScript it remains empty.

" private bool open = false;
public Light myLight;

public void ChangeLightState()
{
    open = !open;
    update();
}

void update()
{
    if (open)
    {
        myLight.enabled = true;
    }
    else
    {
        myLight.enabled = false;

can you let me know what i’ve done wrong. Thank you.

Have you put your LightScript onto a gameobject in the scene?

i have put the lightScript onto a model that i have made, then made a gameObject with a light and trying to put the light onto said script and it doesnt let me. is it something in the script?