First, here’s the GUI bar that I’m trying to resize.
That white bar you see above, is a bar I’m trying to resize based on a number between -1, and 1 that comes from ColorCorrection’s Saturation value.
game.Lighting.ColorCorrection.Saturation
If ColorCorrection’s current Saturation Value is 0, the bar should be halfway filled.
If ColorCorrection’s current Saturation Value is -1, the bar should be empty.
If ColorCorrection’s current Saturation Value is 1, the bar should be completely full.
Under normal circumstances, something like this would work
Bar.Size = UDim2.new(x/max_x,0,1,0)
That would typically return a value between 0 - 1 that could be inputted into UDim2’s X.Scale value.
However, since I’m dealing with a number that can become -1, this does not work the same since a UDim2’s X.Scale value can not be negative in this situation.
Math is not my strongest, I’m sure by using math.abs() this can be solved. I just haven’t quite found the solution yet.
Sorry if this post isn’t the most well written or concise. Any help is appreciated.