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)