Need help with clamping door rotations

I would have a maxYawRotation variable on the door that is exposed and defaulted to let’s say 90. Then on the opening of the door, if the current Yaw rotation is not at the originalYaw of the door + the maxYawRotation, continue opening the door.

Otherwise, don’t.