How to make a part face away from something?

Hello! im not sure how to do this but im trying to make a meshpart face away from a certain part. Im talking about in rotation. Like for example. Instead of this:


I want it to look like this:

What are you trying to do with this? Do you want to script the rotation, or are you trying to use the tween service?

Im trying to use tweenservice. Sorry for the late reply btw

I assume you would like the rocket to orbit around the moon?

The rockets landing on the moon. But it looks less realistic when its just upright

You could just set the inverse of the look at for a cframe

It’s just the look at property and inverse that so it looks away

Do you mind showing me an example code of this? it doesnt look to clear

I am a little confused. Is it not possible to create an animation for this? I think that would be way cleaner and more efficient.

But the target can change so I need to use tweenservice

CFrame.new(rocket.position,-(moon.position))

Just set the CFrame tween to that and it should work

Okay im testing it out ill let you know what happens

It doesnt really work. Im trying to rotate from the x axis or tilt the rocket away from the moon at a certain angle

Can you show us a video of what currently is happening?

1 Like

Sure! Here is the video:
See when the rocket stages it doesnt look realistic when its going to the moon

I got it! On the moon put a part that has the landing orientation you want. Now keep it unanchored and weld it to the moon. (Obviously, make it transparent and can collide = false). Finally, just use the tweenService for both the position and orientation (there are articles on how to do that). Get the position and orientation value from the part. This is probably the simplest and most efficient way to do this. (Also the game looks amazing.)

1 Like

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