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

How do I use Tween Info correctly??

--//IN\\--
    script.Parent.MouseEnter:Connect(function() 
	TweenInfo.new(0.1,Enum.EasingStyle.Sine,Enum.EasingDirection.In,1,true,0.001)  
script.Parent:TweenPosition(UDim2.new(0.032, 0,0.4, 0)) 
	end)
	
--//OUT\\--
	script.Parent.MouseLeave:Connect(function()
	TweenInfo.new(0.1,Enum.EasingStyle.Sine,Enum.EasingDirection.In,1,true,0.001)  	
script.Parent:TweenPosition(UDim2.new(0, 0,0.4, 0))
    end)

1 comment

0

Is the object a 3D object (like a part) or a 2D object (like a Gui)???

2 answers

✓ Accepted answer

This link should be everything you need to describe what TweenInfo is.

TweenInfo is only for 3D objects, not for 2D objects (a Gui for example):

script.Parent.MouseEnter:Connect(function() 
	script.Parent:TweenPosition(UDim2.new(0.032, 0,0.4, 0), 3, true) 
end)
--//OUT\\--
script.Parent.MouseLeave:Connect(function()
	script.Parent:TweenPosition(UDim2.new(0, 0,0.4, 0), 3, true)
end)

1 comment

0

TweenInfo can be used for 2D objects (fading in/out, changing size).

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