script.Parent:TweenSize(UDim2.new(0, 400,0, 150), "Out", "Linear", 0.1, true, function(state)
if state == Enum.TweenStatus.Completed then
script.Parent.Text = "DOne"
end
end)
script.Parent.MouseEnter:Connect(function()
script.Parent:TweenSize(UDim2.new(0, 400,0, 150), "Out", "Linear", 0.1, true, function(state)
if state == Enum.TweenStatus.Completed then
script.Parent.Text = "DOne"
end
end)
end)
Oh ok, but then it removes the tween of my mouse hovering. As you can see I want the first tween code as well as the function you posted to happen after I hover my mouse over it.
local Button = script.Parent
Button.MouseEnter:Connect(function()
Button:TweenSize(UDim2.new(0, 400,0, 150), "Out", "Linear", 0.1, true, function(state)
if state == Enum.TweenStatus.Completed then
script.Parent.Text = "Done"
end
end)
end)
Button.MouseLeave:Connect(function()
Button:TweenSize(UDim2.new(0, 218,0, 117), "Out", "Linear", 0.1, true , function(state)
if state == Enum.TweenStatus.Completed then
script.Parent.Text = "Message"
end
end)
end)