Basically, I want to move a model only to the sides with LookAt().
It works perfectly, however, when I am at a higher ground, the turret faces up, so, how would I make it rotate only to the sides and disregard vertical positions?
Here’s the current code:
local lookAtPoint = CFrame.lookAt(Artillery.PrimaryPart.Position, Reticle.Position)
local lerped = Artillery.PrimaryPart.CFrame:Lerp(lookAtPoint,0.02)
Artillery:SetPrimaryPartCFrame(lerped)
Thank you for reading