So what I am trying to do is rotate a wall based off two markers using the
CFrame.Angles(0, (math.atan2(Difx, Difz) * 180 / math.pi) ,0)
But that didnt work it was off.
So I tried...
math.atan(Difz / Difx) * 180 / math.pi
But that failed to work as well
``` *
[^] [ ]
*
*
\^\ \ \
*
```
Hello! To make a part face a direction, you need to use CFrames made from 2 vector3 values. This will show you how:
MovePart = INSTANCE part the will be moved --This is the part that will be moved Position = Vector3.new(1,2,3) --This will be the position of the part LookTo = INSTANCE to look to --This will be the block the part rotates to MovePart.CFrame = CFrame.new(Position, LookTo.Position) --The math to rotate the part.
I hop this helped. If it didn't, feel free to re-comment or post, and I will get back to you on it!