Hey developers, I have been trying to make a TextButton
that tweens back after the mouse leaves the button, there is no errors in the output, but if you quickly put your mouse over the TextButton
it just stays there.
Script:
local hover = false
script.Parent.MouseEnter:Connect(function()
if not hover then
hover = true
script.Parent.Frame:TweenSize(UDim2.new(0, 298,0, 43), 'InOut', 'Sine', .5)
end
end)
script.Parent.MouseLeave:Connect(function()
if hover then
hover = false
script.Parent.Frame:TweenSize(UDim2.new(0, 0,0, 43), 'InOut', 'Sine', 0.5)
end
end)
Hierarchy:
Any help, tips or suggestions would be greatly appreciated,
Thanks.