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

How do I make a part face another part?

If you don't know what I mean by this, it's kinda like a tower defense game were the tower rotates to face the enemy and shoot it. I want a small explanation on how it works also so I can learn from it.

I haven't tested anything only because I don't even know where to start.

1 answer

✓ Accepted answer

Ok, this does not have to include scripting, but it can. You can insert an AlignOrientation and two attachments. Put the AlignOrientation and 1 attachment into the 1st part and the 2nd attachment into the second part. Also insert this piece of code:

workspace.Part1.AlignOrientation.Attachment0 = workspace.Part1.Attachment
workspace.Part1.AlignOrientation.Attachment1 = workspace.Part2.Attachment

2 comments

0

AlignOrientations align both parts to be the same which wont work for what I am using I'm trying to get a single part to face another part.

0

ok I figured it out its just some cframe stuff CFrame.new(position, faces)

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