The node you’ll want to use is called “Clamp” of the given variety you need, likely “Clamp float” and have that go into the Z of the rotator. But I can’t safely say that because we don’t know what your code looks like! Go get a screenshot of the rotation code and we can figure it out pretty easily from there!
Keep in mind, Relative is parent-based, local is self-based.
But you need to use a SET somewhere, not an ADD. Maybe add a check before the add rotation to make sure “Z > minimum value AND Z < Maximum value” before adding the rotation, and then on the false check
“IF Z < Minimum value, set rotation z to minimum value” and
“IF Z > Maximum value, set rotation z to Maximum value”. So if it overshoots, it corrects itself.