Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Help with MouseEnter and MouseLeave Tweening?

Asked by
FiredDusk 1466 Moderation Voter
7 years ago
Edited 7 years ago

So when I hover over a gui, it Tweens to a certain position but when I stop hovering, I want to go back to the original position. So everytime I hover over the gui I want it to Tween. This clip is what it is currently doing: https://gyazo.com/3dcaeab53117bde06a8dbefd12ff9ee7

script.Parent.MouseEnter:connect(function()
    local ImageLabel = script.Parent.Parent.Parent.ImageLabel
    ImageLabel.Visible = true
    ImageLabel:TweenPosition(UDim2.new(0.5, -75, 0.5, -75), "Out", "Quad")
end)

script.Parent.MouseLeave:connect(function()
    local ImageLabel = script.Parent.Parent.Parent.ImageLabel
    ImageLabel.Visible = false
    ImageLabel.Position = UDim2.new(0.5, -75, 0.3, -75)
end)

Answer this question