Turret facing player using roblox's HingeConstraint

So I have a turret model that has two types of hinges:
[horizontal] : This is the gun itself which needs to go either up or down depending where the player is located at.
Screenshot_7

[vertical] : This is the gun’s stand which needs to move left or right depending where the player is located.
Screenshot_6

As It needs angles I’d need these both calculated In degrees or angles.

Thank you to anyone who helps!

as for the vertical portion of the turret, it doesnt need really any complex movement, you could probably get the magnitude of a player in the area with it, have it face the closest one while maintaining the Y axis, but rotating the X in accordance to where the humanoid root part is, u could probably use a lookvector for that, and lerp it to where it needs to go so it looks smooth as it rotates, as for the bottom you could probably do the same thing, just a suggestion that i thought of, unsure if its helpful, raycasts may be able to work as well honestly

Thank you for your suggestion, I already knew this information but thanks for at least trying!

I’ve found a solution thanks for “ourhouseinjapan” for an idea.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.