When you hover the background gets longer when you leave it gets smaller this is the error.
13:14:04.680 - Players.Player.PlayerGui.Gui.Frame.Frame.TextButton.Script:4: attempt to compare > > two userdata values 13:14:04.681 - Stack Begin 13:14:04.683 - Script 'Players.Player.PlayerGui.Gui.Frame.Frame.TextButton.Script', Line 4 13:14:04.684 - Stack End
And this is the code.
local background = script.Parent.Parent.Background
function enter()
while background.Size < UDim2.new(0,250,0,50) do
wait(.5)
local bgd = background.Size + UDim2.new(0,10,0,0)
end
end
function leave()
while background.Size > UDim2.new(0,0,0,50) do
wait(.5)
local bgs = background.Size - UDim2.new(0,10,0,0)
background.Size = bgs
end
end
script.Parent.MouseEnter:connect(enter)
script.Parent.MouseLeave(leave)
Thanks for the help.

2 comments
You cannot compare a GUI size and a UDim2 value.
Look at me silly mistake mouseleave