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

How can I make blocks move in different ways ?

1 answer

✓ Accepted answer

I'm not too sure about the first one, but I could probably figure out how the second one is done. In the second one, the parts are likely positioned on the X/Z with cos/sin and some angle, multiplied by some other sin function, like this:

Position = Vector3.new(math.cos(SomeAngle), 0, math.sin(SomeAngle)) * (math.sin(SomeAngle) + SomeMinValue)

To calculate a 2D position from an angle, you can use cos to find the X value and sin to find the Y (or in this case Z) value. Those values are then multiplied by the radius of our circle (which in this case is not constant but rather a sine wave) to produce the final position.

2 comments

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