In the Script, with you hold E, a Power Bar start to fill, but i don't know how to Pause the Tweening when the Player stops hold E.
Script:
Ok = false
function SubirForca(inputObject, gameProcessedEvent)
if inputObject.KeyCode == Enum.KeyCode.E then
Ok = true
if Ok == true then
script.Parent.Forca:TweenSize(UDim2.new(0, 200, 0, 20), "Out", "Linear")
print("Subindo barra de força")
end
end
end
game:GetService("UserInputService").InputBegan:connect(SubirForca)
function ManterForca()
Ok = false
print("Força mantida")
end
game:GetService("UserInputService").InputEnded:connect(ManterForca)

2 comments
I believe he's using a GuiObject.
You can still use TweenService.