I'm working on an edit of sFilter to track all general debuffs on the target. I renamed it to aFilter as I still use sFilter for personal buffs. I'm a little stuck though in trying to make the frame appear when I am only in combat.

Your code is currently saying "if this event is PLAYER_REGEN_DISABLED, show this frame, but if it's any other event, hide this frame". If you have any other events registered to the frame, the frame will be hidden whenever any event that is not PLAYER_REGEN_DISABLED occurs.

There are many ways to solve this problem. With no idea what the rest of your code looks like, I can't tell you which way is "best", though, so here are several:

if event == "PLAYER_REGEN_DISABLED" then
self:Show()
elseif event == "PLAYER_REGEN_ENABLED" then
self:Hide()
end

(3) Modify your event handler code to show/hide the frame based on whether the player is currently engaged in combat, instead of based on which event fired:

Code:

if UnitAffectingCombat("player") then
self:Show()
else
self:Hide()
end

Finally, when posting code and asking for help with it, please:

(1) Use indentation. It's not that bad when it's only 5 lines of code, but when you're posting 100+ lines of code with no indentation, it's basically unreadable, and nobody is going to bother trying to read it.

(2) Post all of your code, or at least all of the function you're having trouble with. If you really believe your code is so precious and secret that you can't let us see anything other than the 5 lines of code you think are relevant, at least make sure you're not including random snippets like the extra "end)" at the end of yours.