Basically, when the animatronic is standing at the door, it needs to check whether the door is visible or not. If it is visible, the animatronic goes back to the beginning. If it is not visible, the animatronic goes in after a randomized time (I know how to randomize, thankfully). Also, how could I do an actually scary jumpscare?
ah. Well, i have an idea.
When opening/closing the door, have it update a property (probably true or false, but it doesn’t have to be. whatever you choose). Then, the animatronics can check said property, and decide based on its value. sorry if this is really vague. I’ll try to work more on the idea.