Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Button tweening interrupted will stop?

So when the player mouses over I make the buttons X change by 25 but if my mouse leaves before the button reaches destination it will bug out and I have to mess with it for it to return or fire the MouseLeave

script.Parent.MouseEnter:connect(function()
	script.Parent:TweenPosition(UDim2.new(0, 25, 0, 125), "InOut", .01, true)
end)

script.Parent.MouseLeave:connect(function()
	script.Parent:TweenPosition(UDim2.new(0, 0, 0, 125), "InOut", .01, true)
end)

If anyone knows why this happens please explain it to me because it's very annoying

1 comment

0

I agree. I've had trouble with this as well.

1 answer

script.Parent.MouseEnter:connect(function()
    script.Parent:TweenPosition(UDim2.new(0, 25, 0, 125), Enum.EasingDirection.InOut, Enum.EasingStyle.Quad, .01, true)
end)

script.Parent.MouseLeave:connect(function()
    script.Parent:TweenPosition(UDim2.new(0, 0, 0, 125), Enum.EasingDirection.InOut, Enum.EasingStyle.Quad, .01, true)
end)

This discussion is preserved as it was. New answers, comments, and votes are closed.