Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I make a part face another part?

Asked by
DollorLua 235 Moderation Voter
4 years ago

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

Log in to vote
1
Answered by 4 years ago

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
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. DollorLua 235 — 4y
0
ok I figured it out its just some cframe stuff CFrame.new(position, faces) DollorLua 235 — 4y
Ad

Answer this question