isnear could be false
alight could be null
alight.light could be null
the object this script is attached to could not have a collider
the object this script is attached to could not have a collider marked as a trigger
the thing entering the collider attached to this object could not have a rigidbody
the thing entering the collider attached to this object could not have a collider
isnear could be false - works
alight could be null - works
alight.light could be null - works
the object this script is attached to could not have a collider - works
the object this script is attached to could not have a collider marked as a trigger - works
the thing entering the collider attached to this object could not have a rigidbody - not sure if the players needs that
the thing entering the collider attached to this object could not have a collider - works
If he doesn’t have a rigidbody then the triggers probably aren’t firing and isnear is never set to true. Putting some Debug statements at various points in your code would sort it out rather quickly.