Turret: LookAt Problem

i have a problem where the turret doesnt look at the Target like its supposed to.
i suspect it has something to do with the Humanoid Rootpart

as when i changed its CFrame’s Y Orientation Axis, it worked (it looked at the target directly)
other than that it doesnt work…

local LookAt	= CFrame.lookAt(BodyMotor6d.Part0.Position, CurrentTarget.PrimaryPart.Position)
local rotation 	= LookAt - LookAt.Position
local change 	= {C0 = (rotation - Vector3.new(0,0,rotation.Z))}
local tweenInfo = TweenInfo.new(0.166, Enum.EasingStyle.Linear)

"here's my current code.. or a snippet of what rotates the turret towards a target"

I don’t think that’s how rotations work. You wont get the rotation by subtracting the position.

Why not just use

C0 = CFrame.new(TurretPosition, Target.Position)
1 Like

I would have to see the entire code to help you