I originally raised the issue that the alpha is overwritten in the UpdateColor function leading to issues if you want to lower the alpha of just the StatusBar instead of the entire Health frame.
The problem causes behavior as seen in this gif where, upon every call of UpdateColor, the frame shortly resets to Alpha = 1 before being reset to the desired value.
The solution is relatively simple. Before setting the color of the StatusBar in the UpdateColor function, you get the current alpha and reapply it to bar when updating.
I originally raised the issue that the alpha is overwritten in the UpdateColor function leading to issues if you want to lower the alpha of just the StatusBar instead of the entire Health frame.
The problem causes behavior as seen in this gif where, upon every call of UpdateColor, the frame shortly resets to
Alpha = 1
before being reset to the desired value.The solution is relatively simple. Before setting the color of the StatusBar in the UpdateColor function, you get the current alpha and reapply it to bar when updating.