Frame size increases, but the color does not follow the increase

So essentially when I hold spacebar, the frame size goes up, but the color (red), does not increase.

As you can see in the image, the frame has a bit of red in the beginning(slightly hidden by the yellow box) but it ends with an invisible box.

I do not think it is a problem with my code, but here it is anyway:

local jumpMeter = game.StarterGui.Jump.Frame.JumpMeter

UserInputService.InputBegan:Connect(function(inputObject)
	jump = true
	
	if inputObject.KeyCode == Enum.KeyCode.Space then
		local stateBefore = human:GetState()
		if stateBefore == Enum.HumanoidStateType.Freefall or stateBefore == Enum.HumanoidStateType.FallingDown then
			human.JumpPower = 0
			
		else
		local chargeTrack = human:LoadAnimation(chargeAnim)
		chargeTrack:Play()
		spawn(function()
			if jump == true then
				wait(2.9)
				chargeTrack:AdjustSpeed(0)
			end
		end)

		human.JumpPower = 40
		local size = 0
		repeat
			size = size + 5
			jumpMeter.Size = UDim2.new(0, size, 0, 26)
			local state = human:GetState()
			human.JumpPower = human.JumpPower^1.04
			wait(0.25)
		until jump == false or state == Enum.HumanoidStateType.Jumping or state == Enum.HumanoidStateType.Freefall or state == Enum.HumanoidStateType.FallingDown
		end
	end
end)

The red color frame is stored inside of the Frame. I need more information about what you want, I’m a little confused, but the main thing is that you are increasing the size by pixels, not scale. Try this (make s frame increase in size):

local jumpMeter = game.StarterGui.Jump.Frame.JumpMeter

UserInputService.InputBegan:Connect(function(inputObject)
	jump = true
	
	if inputObject.KeyCode == Enum.KeyCode.Space then
		local stateBefore = human:GetState()
		if stateBefore == Enum.HumanoidStateType.Freefall or stateBefore == Enum.HumanoidStateType.FallingDown then
			human.JumpPower = 0
			
		else
		local chargeTrack = human:LoadAnimation(chargeAnim)
		chargeTrack:Play()
		spawn(function()
			if jump == true then
				wait(2.9)
				chargeTrack:AdjustSpeed(0)
			end
		end)

		human.JumpPower = 40
		local size = 0
		repeat
			size = size + 0.05
             if size>1 then
                size = 1
             end
			jumpMeter.Size = UDim2.new(size,0, 0, 26)
			local state = human:GetState()
			human.JumpPower = human.JumpPower^1.04
			wait(0.25)
		until jump == false or state == Enum.HumanoidStateType.Jumping or state == Enum.HumanoidStateType.Freefall or state == Enum.HumanoidStateType.FallingDown
		end
	end
end)