I made this script to move a text button when the mouse hovers over it. How do I make the text button slide into its position (not quickly moving from one position to the next)? Also how do I keep the text button in that position (when the mouse hovers on the txt button) until the mouse leaves the text button? This is the script I made.
debounce = false
script.Parent.MouseMoved:connect(function()
if debounce == false then
script.Parent.Position = UDim2.new(0, -30, 0, 240)
script.Parent.HoverLine.Visible = true
wait(.2)
debounce = true
wait(.1)
script.Parent.HoverLine.Visible = false
script.Parent.Position = UDim2.new(0, 0, 0, 240)
debounce = false
end
end)

2 comments
would I replace the mouse entered with mouse moved and how would I let the txt button slide back into the position slowly/smoothly?
Easy just make another event called "MouseLeave".