Hello, this is not about correcting coding errors, but rather explaining what scripting methods I should use.
So, I am making a Dalek gun (From Doctor Who), which moves similar to a ball socket, very freely. I use Hinge Constraints to move the Dalek gun, I use TargetAngle to move it vertically, and the Attachment0's Orientation to move it Horizontally.
I'm focusing on moving it horizontally, to move it horizontally, the Vector3 is set like this.
(90,-90,0)
The Y-axis moves the gun sideways, and the X and Z-axis won't change. So, If I move the Y-axis to -45, it will move 45 degrees to the left, in a 45 degrees angle, it will do the opposite in -135.
Back to the question in the title. If I want the gun to point to a certain point. Point between the FirePart (Part where the gun spawns/fires the beam), and the point where my mouse is pointing (Either Mouse.Hit.p or Mouse.Origin.P). What would I use to find that angle, how, and why?
EDIT:
Woah, that almost put my question to rest. If you can help me with this bit, that's great, if not I'll 'Accept Answer' for getting me close to where I need to be.
Where is what I got for that:
gun.CFrame = CFrame.new(FirePart.p, Mouse.Hit.p)
This teleports the part to where the gunpart in my dalek is and the front surface faces where the Mouse.Hit.p is.
How do I kinda get the Part to move with my lookVector. So, If I turn the Dalek (This would also make FirePart.p turn), the Part would make the orientation of FirePart, while matching the Mouse.Hit.p from that position. If that makes any sense.
Kinda like the gun.CFrame, + The orientation/lookVector of the FirePart while still pointing to the Mouse.Hit.p from the position in a sense.

2 comments
I re-edited my question, so I can clarify my question as much as possible. Thanks for the help.
Ohh I get what you mean now. I'll add it to my answer.