Every time I were to make a button with hold animations, and I hold it, no longer hover it, and then stopped holding it, it would stay the same. Like this
Is there a possible way to fix this?
Every time I were to make a button with hold animations, and I hold it, no longer hover it, and then stopped holding it, it would stay the same. Like this
Is there a possible way to fix this?
local normal_size = -- Normal size of the button
button.MouseLeave:Connect(function()
button.Size = normal_size
end)
That’s not going to give him the effect he needs
I suggest you use TweenService instead
I showed how to return the button to its normal size. TweenService he can use on his own.
local info = TweenInfo.new()
local to_size = {Size = normal_size}
local tween = TweenService:Create(button, info, to_size)
tween:Play()
tween.Completed:Wait()
tween:Destroy() -- not causing memory leak
Execute the button’s MouseButton1Up
code whenever its MouseLeave
event/signal fires. MouseButton1Up
's current behavior is to fire if the left mouse button is released while the GuiObject is hovered.