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

Tween Position Help! Please? :D

I have this in a Local Script Inside a imageButton and nothing happenes :O

function onMouseEnter()
		TweenPosition(UDim2.new{0, 10},{0.5, 50},"Out", "Quad",1)
end
script.Parent.MouseEnter:connect(onMouseEnter)

function onMouseLeave()
		TweenPosition(UDim2.new{0, -90},{0.5, 50},"Out", "Quad",1)
end
script.Parent.MouseLeave:connect(onMouseEnter)


1 answer

✓ Accepted answer

The last line is being connected to the first function. Connect it to the second function by changing the text in the parentheses to "onMouseLeave". Also u need to connect the TweenPosition itself to the gui. The entire thing should look like this:

function onMouseEnter()
        script.Parent:TweenPosition(UDim2.new{0, 10},{0.5, 50},"Out", "Quad",1)
end
script.Parent.MouseEnter:connect(onMouseEnter)

function onMouseLeave()
        script.Parent:TweenPosition(UDim2.new{0, -90},{0.5, 50},"Out", "Quad",1)
end
script.Parent.MouseLeave:connect(onMouseLeave)

That should fix it...hope that helps.

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