Why is the TweenService not working? I already changed some of it and it wont fix the tween not working
local Formula = (StaminaAmount/MaxStamina)
Bar:TweenSizeAndPosition(UDim2.new(1, 0, Formula, 0), UDim2.new(0, 0, 1-Formula, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Linear, 0.1, true)
SelDraken
(SelDraken)
October 24, 2022, 11:50pm
#2
What is it supposed to do, fill the bar solid from bottom to top?
When your not moving it refills it but when you hold the Left Shift key while moving it will drain it
From the looks of it I am guessing its an issue with the anchor point since it is sizing to the top left. Make sure that the anchor point of the filling part is (0, 0) as well as making sure it has the same parent as the red stamina bar.
Fixed most of it but thanks
SelDraken
(SelDraken)
October 25, 2022, 12:11am
#6
Can you show the hierarchy of the gui parts?
I feel you might have some sort of ration constratint or something in the inner bar
2 Likes
DasKairo
(Cairo)
October 25, 2022, 12:13am
#7
You can probably do something like this:
while task.wait() do
Bar:TweenSize(UDim2.new(1,0,StaminaAmount / MaxStamina,0), "InOut", "Quad", 0.2, false)
end
Strangly enough i removed them and it worked
system
(system)
Closed
November 8, 2022, 12:21am
#10
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.