for example the weld would part0 would be the body and the part1 would be the turret mesh how would i rotate it towards the mouse(on the y rotation axis) here is the code i have so far
local hit=game.ReplicatedStorage:FindFirstChild("R"):InvokeClient(occupent,0x01)--get player who is sitting in the seats mouse CFrame
local x,y,z=CFrame.new(v.Turret.Position,hit.p):ToEulerAnglesXYZ()
turotweld.C0= turotweld.C0= turorigionc0*CFrame.fromEulerAnglesXYZ(0,-y,0)--turotweld is the --weld i am using to rotate the turret, v.Body is the body part
this seems to "work" at first but you cant rotate the turret backwards

3 comments
w h a t
if you don't understand it, don`t respond...
Rotate the turret backwards if the mouse is in the direction opposite the turrent's lookvector.