Alright i'll start with my overall Objective first to provide some Insight into what i'm attempting to do.
As of right now i'm trying to design a Tank. The issue is that it's a one person tank. This means i'm not going to two have two separate control modules. I want the player piloting the tank to be able to both steer and drive the tank as-well as Operate the turret System.
So here is the issue at hand.
I'm looking for a way to link a players mouse position to the turret system. The idea i have as of now is that moving the horizontal position of the mouse (Relative to the player) will rotate the Turret itself on Y axis and that moving your mouse Vertically will Rotate the Turret's Barrel on t he X Axis.
And while i have designed something that can achieve this task, it operates based off of the activation of the Steer and Drive functions of a vehicle seat.
So the real question here: Is how would i go about linking the rotation of an object on the X axis and another object on the Y axis based on the location of the player's mouse on the screen?
(Please note that the tank still need to move, So Anchored objects aren't exactly Preferable here.)
I also have looked into things such as UnitRays but can't quite figure out how to link that to an objects Rotation.
Seriously, Thanks for the help. ~DeadMann

3 comments
I know this is old, but Mouse.hit is cframe not vector3, this wouldn't work
it's while usingGun == true do, and not while usingGun == true then....
Yeah, those were a couple of typos on my part.