I’m currently trying to rotate a turret I’ve made using a localscript and I’ve got some working code although it rotates on the wrong axis. I’ve tried changing the values around but it hasn’t fixed it. Any help with this would be greatly appreciated
has no difference. I’ve found that switching the axis to (Pivot2.Position, Vector3.new(Mouse.Hit.Position.Z, Mouse.Hit.Position.Y, Pivot2.Position.X)) sort of works, but it starts to go some other way if it goes under 90
local turrethead = -- path to turret head
local targetpos = -- ur target
local initialpos = turrethead.Position
-- a loop
turrethead.CFrame = CFrame.new(initialpos,Vector3.new(initialpos.X,targetpos.Y,initialpos.Z)