... ... FrameName:SetScript("OnEvent", function(self, event, ...) if (event == "PLAYER_REGEN_DISABLED") then frame:Hide() elseif (event == "PLAYER_REGEN_ENABLED") then frame:Show() end end)