Choor Door Project: door not opening

I’ve been working on the Choor Door Project and can’t seem to figure out why the door won’t open. I’ve watched the tutorial video and still can’t seem to detect what’s wrong with my code. Thank you in advance for the help!

<!DOCTYPE html>
<html>
  <head>
    <title>Chore Door!</title>
    <link href="./style.css" rel="stylesheet" type="text/css">
    <link href="https://fonts.googleapis.com/css?family=Work+Sans" rel="stylesheet" type="text/css">
  </head>

  <body>
    <div class="door-row">
      <img id="door1" src="https://s3.amazonaws.com/codecademy-content/projects/chore-door/images/closed_door.svg">
    </div>
    <script type="text/javascript" src="script.js"></script>
  </body>
</html>
let doorImage1 = document.getElementById('door1');
const botDoorPath = "https://s3.amazonaws.com/codecademy-content/projects/chore-door/images/robot.svg";
door1.onclick = () => {
  doorImage1.src=botDoorPath;
}

I’ve even tried swicthing from Chrome to Edge, but that didn’t solve it either. Thanks again!

Did you press the save button?

i put your code in a bin:

https://jsbin.com/fogexevipu/edit?html,js,output

and everything runs smooth, same when running your code in the lesson.

I hit the save button and have also reset the lesson to see if that was the problem. At least I know the code works, just confused why it won’t show in the lesson. Either way, thank you for the help stetim94!

I also ran your code in the lesson, and could not replicate the issue

you could check the console (f12 in most browsers), see if there where any errors. (for next time)

you could try to replace door1.onclick with doorImage1.onclick.

Mine is doing the same thing. I have no idea why. I even tried putting in the code bin as well. It seems to work just fine there. But for whatever reason it will not work in the lesson. I wonder if it is a bug.