How do i make a cylinderlooks to where it is going to? (BEZIER CURVE)

Well, i’m trying to make a missle, and i don’t know how to do it…

Sorry for bad english

Since you’re using a Bezier curve, it should be easy to figure out the next position of the missile. You can just calculate that, then use CFrame.lookAt to orientate the missile to look at that position

i tried it, but it didn’t worked.

What doesn’t work? Does it not orientate in the right direction?

yes, i’m using a cylinder for testing but it just don’t chance the angle.

Can you show me a screenshot or a video of the problem?

https://gyazo.com/ea64d605f2fff98d04ab056e3a162f4d

The cylinder’s rotation is just offset. Try rotating it 90 degrees along the Y-axis in addition to using CFrame.lookAt.

Example:

--at the top of the script
local rotOffset: CFrame = CFrame.Angles(0, math.pi, 0) --90 degrees

--inside the loop
cylinder.CFrame = CFrame.lookAt(bezierBefore, bezierAfter) * rotOffset

now it’s looking weird… https://gyazo.com/3cad4b694755a9dfb61b9503486b58ad

It seems to be aiming towards where the mouse is rather than the cylinder’s direction. Are you sure the code is set up correctly?