You do know that once the doors are open, the loop will carry on? The doors will keep rotating their yaw again and again and again. If you only want them to open once, you need to break from the loop once done.Code:main() { door1= getent( "lol1", "targetname" ); door2= getent( "lol2", "targetname" ); t = 0; while( true ) { if( t == 10 ) { door1 rotateyaw( 90, 2 ); door2 rotateyaw( -90, 2 ); door2 waittill( "rotatedone" ); iPrintInBold( "Castle Opened!" ); } t++; wait 10; } }