i have 2 errors with tweening a image label, when hovering. the first error is that when i hover, it gets bigged for half a second, before going back to the normal size. and how do i make the label scale from the center, not the corner.
here is my script
local btn = script.Parent
local isHovering = false
btn.MouseEnter:Connect(function()
isHovering = true
btn:TweenSize(UDim2.new(0.064, 0,0.091, 0), Enum.EasingDirection.InOut, Enum.EasingStyle.Quint, 0.5, true)
end)
btn.MouseLeave:Connect(function()
isHovering = false
btn:TweenSize(UDim2.new(0.057, 0,0.11, 0), Enum.EasingDirection.InOut, Enum.EasingStyle.Quint, 0.5, true)
end)
btn.MouseButton1Down:Connect(function()
btn:TweenSize(UDim2.new(0.055, 0,0.084, 0), Enum.EasingDirection.InOut, Enum.EasingStyle.Quint, 0.5, true)
end)
btn.MouseButton1Up:Connect(function()
if not isHovering then
btn:TweenSize(UDim2.new(0.057, 0,0.11, 0), Enum.EasingDirection.InOut, Enum.EasingStyle.Quint, 0.5, true)
else
btn:TweenSize(UDim2.new(0.064, 0,0.091, 0), Enum.EasingDirection.InOut, Enum.EasingStyle.Quint, 0.5, true)
end
end)