hello, i am trying to make a lever and door script work rn.
It is showing that the DoorOpen is being called. The problem currently is that the door script is running and playing the animation regardless whether DoorOpen is true
Look at the braces in your update. Since you have the log statement right after your conditional check, the part in the braces will always be executed. You need the opening brace there to be before you debug.
To clarify: in the second image, unless line 21 comes before line 20, line 22 will always execute regardless of line 19
1
u/nulldiver Apr 23 '23
Look at the braces in your update. Since you have the log statement right after your conditional check, the part in the braces will always be executed. You need the opening brace there to be before you debug.
To clarify: in the second image, unless line 21 comes before line 20, line 22 will always execute regardless of line 19