Hello! I am having some issues with the math for a bargraph system that rises when a ghost is seen and goes back down when a ghost goes away, it doesn’t scale all the way and instead kinda goes down a bit and scales 3/4 of the way. I believe it has something to do with my math as it does go up and down fine.
elseif mag < MAX then
Player.PlayerGui.ECTOGoggles.Goggles.Ker.ImageColor3 = Color3.fromRGB(255, 255, 255)
Player.PlayerGui.ECTOGoggles.Goggles.RedLight.ImageColor3 = Color3.fromRGB(255, 255, 255)
local currentPos = Player.PlayerGui.ECTOGoggles.Goggles.Bargraph.BlackGradiant.Position
local targetY = (mag / MAX) * 0.912
targetY = math.min(0.912, targetY)
targetY = 0.912 - targetY
local properties = {
["Size"] = UDim2.new(0.709, 0, targetY * -1 + 1, 0)
}
Any help will be greatly appreciated!