Hey! Can someone tell me how to tween in one direction?
script:
(UDim2.new(stamina / 100, 0, 1, 0), "Out", "Linear", 0)
Hey! Can someone tell me how to tween in one direction?
script:
(UDim2.new(stamina / 100, 0, 1, 0), "Out", "Linear", 0)
end
That is the tween, but it tweens from 0 to 100. How can I code it so it tweens from 0 to 100 and from 100 to 0?
You can use a variable to define the direction.
You can use not
and direction
in the tween to decide the direction
Size = not direction and UDim2.new(stamina / 100, 0, 1, 0) or UDim2.new(1 - stamina / 100, 0, 1, 0),
}):Play()
So I just replace my code with yours?
Because my code does work right now, only it goes from right to left (what I want)
and also from bottom to top (i don’t want)