Tween UI on a (Bézier) curve

I would like to create an effect where a UI tweens into the frame (from the bottom to a certain point) then tweens back out. An example of the type of path I’d like it to follow can be seen below:

Since the UI object will have to pass three distinct points, I have gathered that the best way is probably to use Bézier curves. However, the Roblox article that is linked in a few posts has been taken down and most of the Bézier curve examples I’ve seen are for 3D (parts), so I’m a bit stuck on how to move UI in the 2D space using Bézier curves and UDim2 position points using scale position.

This is my first time looking into Bézier curves so any help on achieving this is appreciated.

1 Like

You could probably use a sine wave for this, this code might help: (I haven’t used sine waves in a while, so something could be incorrect)

local point = 0
while point < 10 do
	local uiPosition = Vector2.new(point, math.sin(point))
	point += 0.1
	wait(0.05)
end

Something I do when I find a useful article is make sure I get it stored on the wayback machine. Here is the article you see referenced.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.