I am working on a GUI that enlarges when you move the mouse over it until you leave it again with the mouse. But if I leave the field with the mouse before the animation is finished, the GUI is stuck at this size. Can anyone help me?
You’re not using TweenService, you’re using tween methods of GuiObjects. To me these are unreliable and you should focus on using the actual TweenService. This is one, more reliable, and two, it would be helpful to practice using this now.
local object -- Fill in the variable
local info = TweenInfo.new(
1, -- Time
Enum.EasingStyle.Quad, -- Style
Enum.EasingDirection.Out, -- Style Direction
4, -- Repeat count
true, -- Reverse before repeat
0.25, -- Delay before repeat
)
local props = {
Color = Color3.new(1,0,0) -- Turning Red
}
game.TweenService:Create(part, info, props):Play()