Opening a door when the player's cursor is over the object, as well as being inside a collision box

This is how it currently looks right now. As of right now, the doors are extremely buggy. Sometimes when you look at a locker door, the one next to it opens, or sometimes the one you’re looking at opens, or nothing opens. No idea why this is happening as it seems to be hit and miss.