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)
Use TweenService to create a new Tween instance, which can then be Pause()
d.
Don't think you can unless you use some knowledge like:
if Ok == false then script.Parent:TweenSize(UDim2.new(0, 0, 0, 0), "InOut", "Linear", .5) end
For more info, read: http://wiki.roblox.com/index.php?title=API:Class/GuiObject/TweenSize