How could I restrict the frame size and also properly tween the frame to small?

I’m trying to make a Quick-Time-Event button function, but

  1. The frame goes over the boundary of the other frame
  2. The frame tweening its size smaller is a bit ragged

For some reason, the fill.Size = UDim2.fromScale(X+0.2, Y+0.2) seems to not work when fill:TweenSize(UDim2.fromScale(0, 0), "In", "Linear", 1, true) was fired.

Here is the other version, with fill:TweenSize(UDim2.fromScale(X+0.15, Y+0.15), "Out", "Back", 0.5, true).

Any response would be appreciated
-Zlurm

What I would recommend is to first check that the fill’s x and y, if added by 0.2, won’t go over the size of background. Instead of tweening the size to 0, try spawning a function with a for loop that decreases the fill sizes to 0.