UIS.InputBegan:Connect(function(Input, gameProcessedEvent)
local KeyCode = Input.KeyCode
if not gameProcessedEvent then
if KeyCode == Enum.KeyCode.T and active == false then
active = true
print("test")
Event:FireServer(active)
while active == true do
wait(0.1)
charge = charge + 1
print(charge)
Ki.KiGui.Frame.Size = Ki.KiGui.Frame.Size - Ki.KiGui.Frame:TweenSize(UDim2.new(0, 1, 0, 0), "Out", "Linear", 1, true)
Ki.KiGui.Frame.Ki.Text = Ki.KiGui.Frame.Ki.Text - 1
end
end
end
end)
When tested, the whole frame just gets smaller and gets out of position. I was wondering how to make it so the bar drains towards the left along with the number

3 comments
Ohh, i sorta understand what you're saying. But when i replaced my line with yours, nothing happens. Am i suppose to subtract if from something? Sorry i'm not use to UDim2
To tween it, you should set the UDim2 values to the same as the current size of the frame, and subtract a number from it, but inside the arguments, not outside as you had done
Ohh, alright thanks