so, allow me to explain, if you’re familiar with the clanning community, often times theres a terminal, for each second you own it, it raises your teams points (by 1 per second) and increases the bar accordingly on the top, however mine is not doing that sizing correctly, here’s my code, if you need more let me know!
function Term.UpdateBars(player, count, bar)
local teamPoints
if count.Name == "Team1Cnt" then
teamPoints = TermSettings.Team1Points.Value
count.Text = TermSettings.Team1Points.Value .. " / " .. TermSettings.Cap.Value
elseif count.Name == "Team2Cnt" then
teamPoints = TermSettings.Team2Points.Value
count.Text = TermSettings.Team2Points.Value .. " / " .. TermSettings.Cap.Value
else
return
end
local maxPoints = TermSettings.Cap.Value
local ratio = teamPoints / maxPoints
local targetSize = UDim2.new(ratio, 0, bar.Size.Y.Scale, 0)
local tweenInfo = TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.Out)
local tween = TweenService:Create(bar, tweenInfo, {Size = targetSize})
tween:Play()
end
obviously, as im sure you can see, it scales incorrectly, when it should be about halfway if not a bit more, the end of the bar (should) be going near the image label there when it reaches max capacity if that makes sense