# Movement along a parabolic trajectory

Hello!
I’m trying to make the block move along a parabolic trajectory. As far as I understand, TweenService can only change the coordinate by the same step. Is there any way I can smoothly change the vertical coordinate regardless of the horizontal one and make a “jump” of the block?

2 Likes

So it’s not a curve but just a jump, correct? So we don’t have to worry about and axis except for the y-axis. This would be quite simple, actually. You can use either a `Sine` or `Circular` Easing style:

``````local TS = game:GetService("TweenService")
local Part = -- The part

local TI = TweenInfo.new(TimeLength, Enum.EasingStyle.Circular, Enum.EasingDirection.In, 0, true)
TS:Create(Part, TI, {Position = Part.Position + Vector3.new(0, 5, 0)})``````
1 Like

No, it’s just bouncing the part up.
I need the “jump” to be made on two axes

1 Like

You can’t do this with TweenService.

If you update the position every RenderStepped it will be just as smooth, but you’ll need to do more stuff manually.

1 Like

Is this the only way to move the part along a given trajectory?

If it was just one direction, then you can use tween service, or you can read up on the formula [ `Ax2 + Bx + C =0` ] to make one:

I’m not really good at math but I’m sure this may help you.

1 Like

Like this?

Just made this in 2-4 min. lol.

If you want to use such a BounceStyle you can just use the equation you see in the link, use it in the game (never really done that but well, why not try):

``````local Part = script.Parent
while true do
wait()
Part.Position.Y = math.abs(math.cos(time())*5)
Part.Position.Z = math.abs(math.sin(time())*5)
--If time dont work, then try tick()
end
``````
3 Likes

It’s not exactly the right code, but now I know where to go next.
Thank you!

1 Like