I’m currently making a script, where if you hover over it, it magnifies the size; but when your mouse leaves the button you were hovering on, it goes back to it’s default size.
It appears that the issue is in the values you are using for the UDim2 size. One of the values is likely causing the button to disappear. Try adjusting the values in small increments to see if you can find the issue.
Also, make sure that the button’s Visible property is set to true, and that it is not being hidden by any other parent elements.
local button = script.Parent
local defaultSize = UDim2.new(0.819, 0, 0.217, 0)
local hoverSize = UDim2.new(0.9, 0, 0.267, 0)
button.MouseEnter:Connect(function()
button.Size = hoverSize
end)
button.MouseLeave:Connect(function()
button.Size = defaultSize
end)