How do I simulate this movement?

Hi all! I’m trying to replicate the movement from the image below and can’t wrap my head around it.

(The arrows are pointing towards the top face of the blocks)

If someone could explain the maths behind how to do this that would be fantastic. It’s easy enough to get the curve with a sine function but I don’t know how I would bring the rotation into it.

1 Like

Using CFrame you could construct a CFrame which always aims at the top of the a block., block.Position + block.CFrame.UpVector)

If you want to use tweenservice you could probably have a start state:

local startPoint =, block.Position + block.CFrame.UpVector) -- On the left looking at the top
local endPoint =, lock.Position + block.CFrame.UpVector) -- Moves it to the rightmost image, still facing up

This assumes you know the start- and endpoint