Part not looking at a target despite constraint being told to do so

So I’ve been developing a game that involves missiles, and decided to use constraints like AlignOrientation and LinearVelocity.

The issue I have with AlignOrientation is that I coded my missile to set the LookAt position in PrimaryAxisLookAt to my target (which I have triple-checked has set the position), and it just arcs and slams into the ground upon launch, as if it was completely ignoring the code.

Not many people have the same issue as me, as I couldn’t find much of anything relating to this on other posts.

This is my code relating to AlignOrientation.

print('reached alignorientation')
lookPart.AlignOrientation.LookAtPosition = target.Position
lookPart.AlignOrientation.Enabled = true
print('set alignorientation')
1 Like

Have you tried setting RigidityEnabled to true to try and see if maybe the issue is not having enough responsiveness or force to change the orientation of your object?

1 Like

The result is almost the exact same when I set it to false, the difference being the missile just slams into the ground slightly sooner.

You might notice that using LookAtPosition will give you a different result than using CFrame, LookAtPosition doesn’t rotate your object so that it faces directly at your other part based on the LookVector of your missile. Have you tried switching your AlignType to Enum.AlignType.AllAxes for ease of use and instead using something like:

local targetLookAt = CFrame.lookAt(missile.Position, target.Position)

I tried the AllAxes AlignType, setting the CFrame to the target’s position, but the missile just did a loop then arced and slammed into the ground.

The CFrame.LookAt solution also didn’t work, producing a result similar to a previous post I had made.

I’ve personally used AlignOrientation for many things myself, and using CFrame.lookAt has usually given me the result I wanted, but I have ended up in some cases where I get a freakish result, usually because of passing an invalid argument.

It’s a little bit harder to help you debug your problem since I can’t see exactly what is happening. Where or what exactly is the target for your missile? Do you have a picture of your missile’s assembly in the Explorer panel? Is it a model with a PrimaryPart acting as the root or is it a BasePart alone?

One more thing, make sure you aren’t setting the CFrame of the AlignOrientation directly to the CFrame of your target. This will cause unwanted behavior, you should be using it the way I specified by passing the position of your missile as the first argument, and the position of your target as the second argument.

I set the CFrame of the AlignOrientation as you said with the arguments, but the missile does a half loop around my test baseplate and travels infinitely downwards in a circular fashion.

Where or what exactly is the target for your missile?

Is it a part that it’s tracking and going after or is it a hardcoded position? Could the target itself be moving unexpectedly?


That is where the target resides compared to the launch center. It is far away, but I set up the workspace so that it still renders and is appearing in the explorer. The target is anchored and shouldn’t be moving for the entire duration of the game.

Try reducing the force of your constraints so that it slowly reaches the target so that you can have a clearer idea of what is going on but not too slow that it just completely drops from the force of gravity itself.

The missile does a large arc, and slams into the baseplate at lower speeds, comparable if not exactly alike to the default speed, which is 550 speed units (I have no idea what to call them, I use LineForce and set it to 550). An interesting thing I noticed is that the missile, when set to higher speeds, does an arc off the baseplate, and then spins vertically for the rest of its way down to the abyss.

Does it even start off going in the direction of the target?

I am heading out right now, so I won’t be able to respond for a few hours, but if you haven’t figured it out by then, I can still try and help you narrow it down.

If you are willing to send me the missile model itself with all of the constraints inside it, I could try and debug it from my end as well. If not, it’s alright. Like I said, it’s just difficult to debug what I can’t see.

The missile doesn’t even try to turn in the right direction when the motor and seeker are activated. I am willing to send you the model with the constraints inside, I am just not sure on how to do it.

You should be able to send me the file in PMs on the forum.

I have just sent you the model and constraints.